Elgg  Version 6.1
Public Member Functions | List of all members
Elgg\Http\OkResponse Class Reference

OK response builder. More...

Inheritance diagram for Elgg\Http\OkResponse:
Elgg\Http\Response Elgg\Http\ResponseBuilder Elgg\Http\DownloadResponse

Public Member Functions

 __construct ($content= '', int $status_code=ELGG_HTTP_OK, string $forward_url=null)
 Constructor. More...
 
- Public Member Functions inherited from Elgg\Http\Response
 setContent ($content= '')
 {Sets response body.
Parameters
mixed$contentContent of the response as a scalar value or an array
Returns
self
Exceptions
InvalidArgumentException
} More...
 
 getContent ()
 {Returns response body.
Returns
mixed
} More...
 
 setException (\Exception $e)
 {Set an exception for this response.
Parameters
\Exception$ethe exception for this response
Returns
self
} More...
 
 getException ()
 {Get the exception for this reponse.
Returns
|null
} More...
 
 setStatusCode (int $status_code)
 {Sets response HTTP status code.
Parameters
int$status_codeStatus code
Returns
self
Exceptions
RangeException
} More...
 
 getStatusCode ()
 {Returns status code.
Returns
int
} More...
 
 setForwardURL (string $forward_url=REFERRER)
 {Sets redirect URL.
Parameters
string$forward_urlForward URL
Returns
self
Exceptions
InvalidArgumentException
} More...
 
 getForwardURL ()
 {Returns redirect URL.
Returns
string|null string the forward url, null when no url was set or the constant REFERRER
} More...
 
 setHeaders (array $headers=[])
 {Sets additional response headers.
Parameters
array$headersHeaders
Returns
self
} More...
 
 getHeaders ()
 {Returns additional response headers.
Returns
array
} More...
 
 isInformational ()
 {Check if response is informational.
Returns
bool
} More...
 
 isSuccessful ()
 {Check if response is successful.
Returns
bool
} More...
 
 isOk ()
 {Check if response is OK.
Returns
bool
} More...
 
 isRedirection ()
 {Check if response is redirection.
Returns
bool
} More...
 
 isClientError ()
 {Check if response is client error.
Returns
bool
} More...
 
 isServerError ()
 {Check if response is server error.
Returns
bool
} More...
 
 isNotModified ()
 {Check if response has been modified.
Returns
bool
} More...
 

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
 

Detailed Description

OK response builder.

Definition at line 8 of file OkResponse.php.

Constructor & Destructor Documentation

Elgg\Http\OkResponse::__construct (   $content = '',
int  $status_code = ELGG_HTTP_OK,
string  $forward_url = null 
)

Constructor.

Parameters
mixed$contentResponse data
int$status_codeHTTP status code
string$forward_urlForward URL
See also
elgg_ok_response()

Definition at line 19 of file OkResponse.php.


The documentation for this class was generated from the following file: