\Pop\Kettle\ControllerApplicationController

Console application controller class

Summary

Methods
Properties
Constants
__construct()
application()
console()
error()
setDefaultAction()
getDefaultAction()
dispatch()
init()
createController()
createModel()
createView()
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

init()

init(string  $namespace, array  $options = array()) : void

Init command

Parameters

string $namespace
array $options

createController()

createController(string  $ctrl, array  $options = array()) : void

Create controller command

Parameters

string $ctrl
array $options

createModel()

createModel(string  $model) : void

Create model command

Parameters

string $model

createView()

createView(string  $view) : void

Create view command

Parameters

string $view