Elgg  Version master
OkResponse.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Http;
4 
8 class OkResponse extends Response {
9 
19  public function __construct($content = '', int $status_code = ELGG_HTTP_OK, string $forward_url = null) {
20  $this->setContent($content);
22 
23  if (isset($forward_url)) {
25  }
26  }
27 }
string $forward_url
Definition: Response.php:20
Response builder.
Definition: Response.php:14
const ELGG_HTTP_OK
Definition: constants.php:45
setStatusCode(int $status_code)
{Sets response HTTP status code.Status code self }
Definition: Response.php:65
setForwardURL(string $forward_url=REFERRER)
{Sets redirect URL.Forward URL self }
Definition: Response.php:84
setContent($content= '')
{Sets response body.Content of the response as a scalar value or an array self }
Definition: Response.php:31
__construct($content= '', int $status_code=ELGG_HTTP_OK, string $forward_url=null)
Constructor.
Definition: OkResponse.php:19
OK response builder.
Definition: OkResponse.php:8