PHP Интерфейс ManaPHP\Mvc\DispatcherInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

dispatch() публичный Метод

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
Результат false | ManaPHP\Mvc\ControllerInterface

forward() публичный Метод

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

getActionName() публичный Метод

Gets last dispatched action name
public getActionName ( ) : string
Результат string

getController() публичный Метод

public getController ( ) : Controller
Результат Controller

getControllerName() публичный Метод

Gets last dispatched controller name
public getControllerName ( ) : string
Результат string

getModuleName() публичный Метод

Gets the module where the controller class is
public getModuleName ( ) : string
Результат string

getParam() публичный Метод

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
Результат mixed

getParams() публичный Метод

Gets action params
public getParams ( ) : array
Результат array

getPreviousActionName() публичный Метод

Returns the previous action in the dispatcher
public getPreviousActionName ( ) : string
Результат string

getPreviousControllerName() публичный Метод

Returns the previous controller in the dispatcher
public getPreviousControllerName ( ) : string
Результат string

getReturnedValue() публичный Метод

Returns value returned by the latest dispatched action
public getReturnedValue ( ) : mixed
Результат mixed

hasParam() публичный Метод

public hasParam ( string $param ) : boolean
$param string
Результат boolean

setActionName() публичный Метод

public setActionName ( string $actionName ) : static
$actionName string
Результат static

setControllerName() публичный Метод

public setControllerName ( string $controllerName ) : static
$controllerName string
Результат static

setParams() публичный Метод

public setParams ( array $params, boolean $merge = true ) : static
$params array
$merge boolean
Результат static

wasForwarded() публичный Метод

Check if the current executed action was forwarded by another one
public wasForwarded ( ) : boolean
Результат boolean