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 22 of file Application.php.

Public Member Functions

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

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructor.

Definition at line 36 of file Application.php.

◆ __destruct()

__destruct ( )

Destructor.

Definition at line 48 of file Application.php.

Member Function Documentation

◆ initialize()

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 72 of file Application.php.

◆ run()

run ( Request  $request)

Run the application with the given request.

Parameters
$request
Returns
Response instance

Definition at line 119 of file Application.php.

◆ handleException()

handleException ( \Exception  $exception)

Default exception handling method.

Rolls back the transaction and executes 'failure' action.

Parameters
$exceptionThe Exception instance

Definition at line 130 of file Application.php.

◆ outputHandler()

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 170 of file Application.php.