ApplicationController
extends AbstractController
in package
Console application 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
- createController() : void
- Create controller command
- createModel() : void
- Create model command
- createView() : void
- Create view command
- dispatch() : void
- Dispatch the controller based on the action
- error() : void
- Default error action method
- getDefaultAction() : string
- Get the default action
- init() : void
- Init command
- 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 —createController()
Create controller command
public
createController(string $ctrl[, array<string|int, mixed> $options = [] ]) : void
Parameters
- $ctrl : string
- $options : array<string|int, mixed> = []
Return values
void —createModel()
Create model command
public
createModel(string $model) : void
Parameters
- $model : string
Return values
void —createView()
Create view command
public
createView(string $view) : void
Parameters
- $view : string
Return values
void —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 —init()
Init command
public
init(string $namespace[, array<string|int, mixed> $options = [] ]) : void
Parameters
- $namespace : string
- $options : array<string|int, mixed> = []
Return values
void —setDefaultAction()
Set the default action
public
setDefaultAction(string $default) : AbstractController
Parameters
- $default : string