ConsoleController
extends AbstractController
in package
Console 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
- help() : void
- Help command
- serve() : void
- Serve command
- setDefaultAction() : AbstractController
- Set the default action
- version() : void
- Version command
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 —help()
Help command
public
help() : void
Return values
void —serve()
Serve command
public
serve([array<string|int, mixed> $options = [] ]) : void
Parameters
- $options : array<string|int, mixed> = []
Tags
Return values
void —setDefaultAction()
Set the default action
public
setDefaultAction(string $default) : AbstractController
Parameters
- $default : string
Return values
AbstractController —version()
Version command
public
version() : void