Application Class Reference

Detailed Description

Application is the main application class, that does all the initialization.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 23 of file Application.php.

Public Member Functions

 __construct ()
 
 __destruct ()
 
 initialize ($defaultController='', $defaultContext='', $defaultAction='login')
 
 run (Request $request)
 
 handleException (\Exception $exception, Request $request=null)
 
 outputHandler ($buffer)
 

Constructor & Destructor Documentation

__construct ( )

Constructor.

Definition at line 35 of file Application.php.

__destruct ( )

Destructor.

Definition at line 47 of file Application.php.

Member Function Documentation

initialize (   $defaultController = '',
  $defaultContext = '',
  $defaultAction = 'login' 
)

Initialize the request.

Parameters
$defaultControllerThe controller to call if none is given in request parameters (optional, default: '')
$defaultContextThe context to set if none is given in request parameters (optional, default: '')
$defaultActionThe action to perform if none is given in request parameters (optional, default: 'login')
Returns
Request instance representing the current HTTP request

Definition at line 71 of file Application.php.

run ( Request  $request)

Run the application with the given request.

Parameters
$request
Returns
Response instance

Definition at line 108 of file Application.php.

handleException ( \Exception  $exception,
Request  $request = null 
)

Default exception handling method.

Rolls back the transaction and executes 'failure' action.

Parameters
$exceptionThe Exception instance
$requestThe Request instance

Definition at line 120 of file Application.php.

outputHandler (   $buffer)

This method is run as ob_start callback.

Note
must be public
Parameters
$bufferThe content to be returned to the client
Returns
String

Definition at line 147 of file Application.php.