Elgg  Version 4.x
ErrorResponse.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Http;
4 
8 class ErrorResponse extends Response {
9 
20  if ($status_code < 100 || $status_code > 599) {
22  }
23 
24  $this->setContent($error);
27  }
28 }
Response builder.
Definition: Response.php:13
Error response builder.
setStatusCode(int $status_code)
{Sets response HTTP status code.Status code self }
Definition: Response.php:76
$error
Bad request error.
Definition: 400.php:6
const REFERRER
Definition: constants.php:42
setContent($content= '')
{Sets response body.Content of the response as a scalar value or an array self }
Definition: Response.php:43
const ELGG_HTTP_BAD_REQUEST
Definition: constants.php:79
__construct($error= '', int $status_code=ELGG_HTTP_BAD_REQUEST, $forward_url=REFERRER)
Constructor.
const ELGG_HTTP_INTERNAL_SERVER_ERROR
Definition: constants.php:106
setForwardURL($forward_url=REFERRER)
{Sets redirect URL.Forward URL self }
Definition: Response.php:94