Detailed Description
Response holds the response values that are used as output from Controller instances.
It is typically instantiated by the ActionMapper instance and filled during Controller execution.
Definition at line 20 of file Response.php.
Public Member Functions | |
setCacheId ($cacheId) | |
getCacheId () | |
setStatus ($status) | |
getStatus () | |
setFile ($filename, $content='') | |
getFile () | |
setFinal () | |
isFinal () | |
Public Attributes | |
const | STATUS_200 = '200 OK' |
const | STATUS_201 = '201 Created' |
const | STATUS_202 = '202 Accepted' |
const | STATUS_204 = '204 No Content' |
const | STATUS_400 = '400 Bad Request' |
const | STATUS_404 = '404 Not Found' |
Member Function Documentation
setCacheId | ( | $cacheId | ) |
Set a string value that uniquely identifies the request data that cause the current response.
This value maybe used to compare two requests and return cached responses based on the result.
- Parameters
-
$cacheId
Implemented in DefaultResponse.
getCacheId | ( | ) |
setStatus | ( | $status | ) |
Set the response HTTP status code.
- Parameters
-
$status The HTTP status code
Implemented in DefaultResponse.
getStatus | ( | ) |
setFile | ( | $filename, | |
$content = '' |
|||
) |
Set a file download.
NOTE: This automatically sets the response to final (see Response::setFinal)
- Parameters
-
$filename The name of the file, must be a real file, if no content is provided $content File content, if in-memory only (optional)
Implemented in DefaultResponse.
getFile | ( | ) |
Get the file download.
- Returns
- Array with keys 'filename' and 'content' or null
Implemented in DefaultResponse.
setFinal | ( | ) |
Make sure there is no further processing after this response.
Implemented in DefaultResponse.
isFinal | ( | ) |
Check if the response forbids further processing or not.
- Returns
- Boolean
Implemented in DefaultResponse.
Member Data Documentation
const STATUS_200 = '200 OK' |
Definition at line 22 of file Response.php.
const STATUS_201 = '201 Created' |
Definition at line 23 of file Response.php.
const STATUS_202 = '202 Accepted' |
Definition at line 24 of file Response.php.
const STATUS_204 = '204 No Content' |
Definition at line 25 of file Response.php.
const STATUS_400 = '400 Bad Request' |
Definition at line 27 of file Response.php.
const STATUS_404 = '404 Not Found' |
Definition at line 28 of file Response.php.