SlaxWeb Framework
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
SlaxWeb\Router\Response Class Reference
Inheritance diagram for SlaxWeb\Router\Response:
Inheritance graph
[legend]
Collaboration diagram for SlaxWeb\Router\Response:
Collaboration graph
[legend]

Public Member Functions

 addContent (string $content)
 
 redirect (string $url, bool $write=true)
 
 send ()
 

Protected Attributes

 $redirect = null
 

Member Function Documentation

SlaxWeb\Router\Response::addContent ( string  $content)

Add To Content

Add retrieved input to the end of already existing content in the Response object.

Parameters
string$contentContent to be added.
Returns
SlaxWeb\Router\Response::redirect ( string  $url,
bool  $write = true 
)

Redirect

Creates a new Redirect Response object and stores it to the class property. If a direct write is requested through the second optional parameter, the send method is immediatelly called, which is the default behaviour. To avoid that, bool(false) has to be sent as the second parameter.

Parameters
string$urlURL to redirect to
bool$writeWrite response and stop further execution
Returns
void
SlaxWeb\Router\Response::send ( )

Send

Override the 'send' method to check if a redirect response has been set, and send that Response instead. If not, a normal call to the parent 'send' method is made.

Returns

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