|
Elgg
Version 2.3
|
Response builder. More...
Public Member Functions | ||||||
| __construct ($content='', $status_code=ELGG_HTTP_OK, $forward_url=null) | ||||||
| Constructor. More... | ||||||
| setContent ($content='') | ||||||
{Sets response body.
| ||||||
| getContent () | ||||||
{Returns response body.
| ||||||
| setStatusCode ($status_code=ELGG_HTTP_OK) | ||||||
{Sets response HTTP status code.
| ||||||
| getStatusCode () | ||||||
{Returns status code.
| ||||||
| setForwardURL ($forward_url=REFERRER) | ||||||
{Sets redirect URL.
| ||||||
| getForwardURL () | ||||||
{Returns redirect URL.
| ||||||
| setHeaders (array $headers=[]) | ||||||
{Sets additional response headers.
| ||||||
| getHeaders () | ||||||
{Returns additional response headers.
| ||||||
| isInformational () | ||||||
{Check if response is informational.
| ||||||
| isSuccessful () | ||||||
{Check if response is successful.
| ||||||
| isOk () | ||||||
{Check if response is OK.
| ||||||
| isRedirection () | ||||||
{Check if response is redirection.
| ||||||
| isClientError () | ||||||
{Check if response is client error.
| ||||||
| isServerError () | ||||||
{Check if response is server error.
| ||||||
| isNotModified () | ||||||
{Check if response has been modified.
| ||||||
Protected Attributes | |
| $content | |
| $status_code | |
| $forward_url | |
| $headers | |
Response builder.
Definition at line 10 of file OkResponse.php.
| Elgg\Http\OkResponse::__construct | ( | $content = '', |
|
$status_code = ELGG_HTTP_OK, |
|||
$forward_url = null |
|||
| ) |
Constructor.
| mixed | $content | Response data |
| int | $status_code | HTTP status code |
| string | $forward_url | Forward URL @access private |
Reimplemented in Elgg\Http\ErrorResponse.
Definition at line 41 of file OkResponse.php.
| Elgg\Http\OkResponse::getContent | ( | ) |
{Returns response body.
Implements Elgg\Http\ResponseBuilder.
Definition at line 61 of file OkResponse.php.
| Elgg\Http\OkResponse::getForwardURL | ( | ) |
{Returns redirect URL.
Implements Elgg\Http\ResponseBuilder.
Definition at line 97 of file OkResponse.php.
| Elgg\Http\OkResponse::getHeaders | ( | ) |
{Returns additional response headers.
Implements Elgg\Http\ResponseBuilder.
Definition at line 112 of file OkResponse.php.
| Elgg\Http\OkResponse::getStatusCode | ( | ) |
{Returns status code.
Implements Elgg\Http\ResponseBuilder.
Definition at line 79 of file OkResponse.php.
| Elgg\Http\OkResponse::isClientError | ( | ) |
{Check if response is client error.
Implements Elgg\Http\ResponseBuilder.
Definition at line 147 of file OkResponse.php.
| Elgg\Http\OkResponse::isInformational | ( | ) |
{Check if response is informational.
Implements Elgg\Http\ResponseBuilder.
Definition at line 119 of file OkResponse.php.
| Elgg\Http\OkResponse::isNotModified | ( | ) |
{Check if response has been modified.
Implements Elgg\Http\ResponseBuilder.
Definition at line 161 of file OkResponse.php.
| Elgg\Http\OkResponse::isOk | ( | ) |
{Check if response is OK.
Implements Elgg\Http\ResponseBuilder.
Definition at line 133 of file OkResponse.php.
| Elgg\Http\OkResponse::isRedirection | ( | ) |
{Check if response is redirection.
Implements Elgg\Http\ResponseBuilder.
Definition at line 140 of file OkResponse.php.
| Elgg\Http\OkResponse::isServerError | ( | ) |
{Check if response is server error.
Implements Elgg\Http\ResponseBuilder.
Definition at line 154 of file OkResponse.php.
| Elgg\Http\OkResponse::isSuccessful | ( | ) |
{Check if response is successful.
Implements Elgg\Http\ResponseBuilder.
Definition at line 126 of file OkResponse.php.
| Elgg\Http\OkResponse::setContent | ( | $content = '' | ) |
{Sets response body.
| mixed | $content | Content of the response as a scalar value or an array |
| InvalidArgumentException |
Implements Elgg\Http\ResponseBuilder.
Definition at line 50 of file OkResponse.php.
| Elgg\Http\OkResponse::setForwardURL | ( | $forward_url = REFERRER | ) |
{Sets redirect URL.
| string | $forward_url | Forward URL |
| InvalidArgumentException |
Implements Elgg\Http\ResponseBuilder.
Definition at line 86 of file OkResponse.php.
| Elgg\Http\OkResponse::setHeaders | ( | array | $headers = [] | ) |
{Sets additional response headers.
| array | $headers | Headers |
Implements Elgg\Http\ResponseBuilder.
Definition at line 104 of file OkResponse.php.
| Elgg\Http\OkResponse::setStatusCode | ( | $status_code = ELGG_HTTP_OK | ) |
{Sets response HTTP status code.
| int | $status_code | Status code |
| InvalidArgumentException |
Implements Elgg\Http\ResponseBuilder.
Definition at line 68 of file OkResponse.php.
|
protected |
Definition at line 15 of file OkResponse.php.
|
protected |
Definition at line 25 of file OkResponse.php.
|
protected |
Definition at line 30 of file OkResponse.php.
|
protected |
Definition at line 20 of file OkResponse.php.