Application Class Reference
Detailed Description
Application is the main application class, that does all the initialization.
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
-
$defaultController The controller to call if none is given in request parameters (optional, default: '') $defaultContext The context to set if none is given in request parameters (optional, default: '') $defaultAction The 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
-
$exception The Exception instance $request The 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
-
$buffer The content to be returned to the client
- Returns
- String
Definition at line 147 of file Application.php.