PHP Interface ManaPHP\Mvc\DispatcherInterface

Datei anzeigen Open project: manaphp/manaphp

Public Methods

Method Description
dispatch ( string $module, string $controller, string $action, array $params = null ) : false | ManaPHP\Mvc\ControllerInterface Dispatches a handle action taking into account the routing parameters
forward ( string $forward, array $params = [] ) Forwards the execution flow to another controller/action
getActionName ( ) : string Gets last dispatched action name
getController ( ) : Controller
getControllerName ( ) : string Gets last dispatched controller name
getModuleName ( ) : string Gets the module where the controller class is
getParam ( string | integer $param, string | array $filters = null, mixed $defaultValue = null ) : mixed Gets a param by its name or numeric index
getParams ( ) : array Gets action params
getPreviousActionName ( ) : string Returns the previous action in the dispatcher
getPreviousControllerName ( ) : string Returns the previous controller in the dispatcher
getReturnedValue ( ) : mixed Returns value returned by the latest dispatched action
hasParam ( string $param ) : boolean
setActionName ( string $actionName ) : static
setControllerName ( string $controllerName ) : static
setParams ( array $params, boolean $merge = true ) : static
wasForwarded ( ) : boolean Check if the current executed action was forwarded by another one

Method Details

dispatch() public method

Dispatches a handle action taking into account the routing parameters
public dispatch ( string $module, string $controller, string $action, array $params = null ) : false | ManaPHP\Mvc\ControllerInterface
$module string
$controller string
$action string
$params array
return false | ManaPHP\Mvc\ControllerInterface

forward() public method

Forwards the execution flow to another controller/action
public forward ( string $forward, array $params = [] )
$forward string
$params array

getActionName() public method

Gets last dispatched action name
public getActionName ( ) : string
return string

getController() public method

public getController ( ) : Controller
return Controller

getControllerName() public method

Gets last dispatched controller name
public getControllerName ( ) : string
return string

getModuleName() public method

Gets the module where the controller class is
public getModuleName ( ) : string
return string

getParam() public method

Gets a param by its name or numeric index
public getParam ( string | integer $param, string | array $filters = null, mixed $defaultValue = null ) : mixed
$param string | integer
$filters string | array
$defaultValue mixed
return mixed

getParams() public method

Gets action params
public getParams ( ) : array
return array

getPreviousActionName() public method

Returns the previous action in the dispatcher
public getPreviousActionName ( ) : string
return string

getPreviousControllerName() public method

Returns the previous controller in the dispatcher

getReturnedValue() public method

Returns value returned by the latest dispatched action
public getReturnedValue ( ) : mixed
return mixed

hasParam() public method

public hasParam ( string $param ) : boolean
$param string
return boolean

setActionName() public method

public setActionName ( string $actionName ) : static
$actionName string
return static

setControllerName() public method

public setControllerName ( string $controllerName ) : static
$controllerName string
return static

setParams() public method

public setParams ( array $params, boolean $merge = true ) : static
$params array
$merge boolean
return static

wasForwarded() public method

Check if the current executed action was forwarded by another one
public wasForwarded ( ) : boolean
return boolean