Request Interface Reference
Detailed Description
Request holds the request values that are used as input to Controller instances.
Definition at line 18 of file Request.php.
Inheritance diagram for Request:
Public Member Functions | |
setResponse (Response $response) | |
getResponse () | |
initialize ($controller=null, $context=null, $action=null) | |
getMethod () | |
setResponseFormat ($format) | |
getResponseFormat () | |
Member Function Documentation
◆ setResponse()
setResponse | ( | Response | $response | ) |
Set the Response instance belonging to the request and vice versa.
- Parameters
-
$response Response
Implemented in DefaultRequest.
◆ getResponse()
getResponse | ( | ) |
◆ initialize()
initialize | ( | $controller = null , |
|
$context = null , |
|||
$action = null |
|||
) |
Initialize the request instance from the HTTP request.
- Parameters
-
$controller The controller to call if none is given in request parameters (optional) $context The context to set if none is given in request parameters (optional) $action The action to perform if none is given in request parameters (optional)
Implemented in DefaultRequest.
◆ getMethod()
getMethod | ( | ) |
◆ setResponseFormat()
setResponseFormat | ( | $format | ) |
Set the desired response format.
- Parameters
-
$format A key of the configuration section 'Formats'
Implemented in DefaultRequest.
◆ getResponseFormat()
getResponseFormat | ( | ) |
Get the message response format.
If no explicit format is set, the format is derived from the Content-Type header value, if existing. If no format can be derived, the first format in the configuration key 'Formats' will be used.
- Returns
- String
Implemented in DefaultRequest.