Elgg  Version master
Public Member Functions | List of all members
Elgg\Http\RedirectResponse Class Reference

Redirect response builder. More...

Inheritance diagram for Elgg\Http\RedirectResponse:
Elgg\Http\Response Elgg\Http\ResponseBuilder

Public Member Functions

 __construct (string $forward_url=REFERRER, int $status_code=ELGG_HTTP_FOUND, bool $secure_forward_url=true)
 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

Redirect response builder.

Definition at line 8 of file RedirectResponse.php.

Constructor & Destructor Documentation

Elgg\Http\RedirectResponse::__construct ( string  $forward_url = REFERRER,
int  $status_code = ELGG_HTTP_FOUND,
bool  $secure_forward_url = true 
)

Constructor.

Parameters
string$forward_urlForward url
int$status_codeHTTP status code
bool$secure_forward_urlIf true the forward url will be validated to be an on-site url
See also
elgg_redirect_response()

Definition at line 19 of file RedirectResponse.php.


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