Application Class Reference
Detailed Description
Application is the main application class, that does all the initialization.
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
-
$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 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
-
$exception The 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
-
$buffer The content to be returned to the client
- Returns
- String
Definition at line 170 of file Application.php.