\Pluf_HTTP_Response_RedirectToLogin

Can be used as a response to return when a user must be logged to access a page.

When constructing a view, the response object must be populated and returned. The response is then displayed to the visitor. The interest of using a response object is that we can run a post filter action on the response. For example you can run a filter that is checking that all the output is valid HTML and write a logfile if this is not the case.

Summary

Methods
Properties
Constants
__construct()
render()
outputHeaders()
hashCode()
$content
$headers
$status_code
$cookies
$status_code_list
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$content

$content : 

Content of the response.

Type

$headers

$headers : 

Array of the headers to add.

For example $this->headers['Content-Type'] = 'text/html; charset=utf-8';

Type

$status_code

$status_code : 

Status code of the answer.

Type

$cookies

$cookies : 

Cookies to send.

$this->cookies['my_cookie'] = 'content of the cookie';

Type

$status_code_list

$status_code_list : 

Status code list.

Type

Methods

__construct()

__construct(  $request,   $loginurl = null) 

The $request object is used to know what the post login redirect url should be.

If the action url of the login page is not set, it will try to get the url from the login view from the 'login_view' configuration key.

Parameters

$request
$loginurl

render()

render(  $output_body = true) 

Render a response object.

Parameters

$output_body

outputHeaders()

outputHeaders() 

Output headers.

hashCode()

hashCode() 

Return hash code of the object