\Pop\Kettle\ControllerConsoleController

Console controller class

Summary

Methods
Properties
Constants
__construct()
application()
console()
error()
setDefaultAction()
getDefaultAction()
dispatch()
serve()
help()
version()
No public properties found
No constants found
No protected methods found
$application
$console
$defaultAction
N/A
No private methods found
No private properties found
N/A

Properties

$application

$application : \Pop\Application

Application object

Type

\Pop\Application

$defaultAction

$defaultAction : string

Default action

Type

string

Methods

__construct()

__construct(\Pop\Application  $application, \Pop\Console\Console  $console) 

Constructor for the controller

Parameters

\Pop\Application $application
\Pop\Console\Console $console

application()

application() : \Pop\Application

Get application object

Returns

\Pop\Application

error()

error() : void

Default error action method

Throws

\Pop\Kettle\Exception

setDefaultAction()

setDefaultAction(string  $default) : \Pop\Controller\AbstractController

Set the default action

Parameters

string $default

Returns

\Pop\Controller\AbstractController

getDefaultAction()

getDefaultAction() : string

Get the default action

Returns

string

dispatch()

dispatch(string  $action = null, array  $params = null) : void

Dispatch the controller based on the action

Parameters

string $action
array $params

Throws

\Pop\Controller\Exception

serve()

serve(array  $options = array()) : void

Serve command

Parameters

array $options

Throws

\Pop\Kettle\Exception

help()

help() : void

Help command

version()

version() : void

Version command