- 'data': Retrieves values from POST data.
- 'params': Retrieves query parameters returned from the routing system.
- 'query': Retrieves values from GET data.
- 'env': Retrieves values from the server or environment, such as 'env:https', or custom
environment values, like 'env:base'. See the env() method for more info.
- 'http': Retrieves header values (i.e. 'http:accept'), or the HTTP request method (i.e.
'http:method').
This method is used in several different places in the framework in order to provide the
ability to act conditionally on different aspects of the request. See Media::type() (the
section on content negotiation) and the routing system for more information.
_Note_: All keys should be _lower-cased_, even when getting HTTP headers.
public get ( string $key ) : string | ||
$key | string | A prefixed key indicating what part of the request data the requested value should come from, and the name of the value to retrieve, in lower case. |
return | string | Returns the value of a GET, POST, routing or environment variable, or an HTTP header or method name. |