Elgg
Version 6.1
|
Error response builder. More...
Public Member Functions | ||||||
__construct ($error= '', int $status_code=ELGG_HTTP_BAD_REQUEST, string $forward_url=REFERRER) | ||||||
Constructor. More... | ||||||
Public Member Functions inherited from Elgg\Http\Response | ||||||
setContent ($content= '') | ||||||
{Sets response body.
| ||||||
getContent () | ||||||
{Returns response body.
| ||||||
setException (\Exception $e) | ||||||
{Set an exception for this response.
| ||||||
getException () | ||||||
{Get the exception for this reponse.
| ||||||
setStatusCode (int $status_code) | ||||||
{Sets response HTTP status code.
| ||||||
getStatusCode () | ||||||
{Returns status code.
| ||||||
setForwardURL (string $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.
| ||||||
Additional Inherited Members | |
Protected Attributes inherited from Elgg\Http\Response | |
$content | |
int | $status_code |
string | $forward_url = null |
array | $headers = [] |
Exception | $exception = null |
bool | $secure_forward_url = true |
Error response builder.
Definition at line 8 of file ErrorResponse.php.
Elgg\Http\ErrorResponse::__construct | ( | $error = '' , |
|
int | $status_code = ELGG_HTTP_BAD_REQUEST , |
||
string | $forward_url = REFERRER |
||
) |
Constructor.
mixed | $error | Error message / content |
int | $status_code | HTTP status code |
string | $forward_url | Forward url |
Definition at line 19 of file ErrorResponse.php.