AbstractController
extends AbstractController
in package
Console abstract controller class
Tags
Table of Contents
- $application : Application
- Application object
- $console : Console
- Console object
- $defaultAction : string
- Default action
- __construct() : mixed
- Constructor for the controller
- application() : Application
- Get application object
- console() : Console
- Get request object
- dispatch() : void
- Dispatch the controller based on the action
- error() : void
- Default error action method
- getDefaultAction() : string
- Get the default action
- setDefaultAction() : AbstractController
- Set the default action
Properties
$application
Application object
protected
Application
$application
= null
$console
Console object
protected
Console
$console
= null
$defaultAction
Default action
protected
string
$defaultAction
= 'error'
Methods
__construct()
Constructor for the controller
public
__construct(Application $application, Console $console) : mixed
Parameters
- $application : Application
- $console : Console
Return values
mixed —application()
Get application object
public
application() : Application
Return values
Application —console()
Get request object
public
console() : Console
Return values
Console —dispatch()
Dispatch the controller based on the action
public
dispatch([string $action = null ][, array<string|int, mixed> $params = null ]) : void
Parameters
- $action : string = null
- $params : array<string|int, mixed> = null
Tags
Return values
void —error()
Default error action method
public
error() : void
Tags
Return values
void —getDefaultAction()
Get the default action
public
getDefaultAction() : string
Return values
string —setDefaultAction()
Set the default action
public
setDefaultAction(string $default) : AbstractController
Parameters
- $default : string