PHP Interface ManaPHP\Mvc\DispatcherInterface

Afficher le fichier Open project: manaphp/manaphp

Méthodes publiques

Méthode 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 méthode

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
Résultat false | ManaPHP\Mvc\ControllerInterface

forward() public méthode

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

getActionName() public méthode

Gets last dispatched action name
public getActionName ( ) : string
Résultat string

getController() public méthode

public getController ( ) : Controller
Résultat Controller

getControllerName() public méthode

Gets last dispatched controller name
public getControllerName ( ) : string
Résultat string

getModuleName() public méthode

Gets the module where the controller class is
public getModuleName ( ) : string
Résultat string

getParam() public méthode

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
Résultat mixed

getParams() public méthode

Gets action params
public getParams ( ) : array
Résultat array

getPreviousActionName() public méthode

Returns the previous action in the dispatcher
public getPreviousActionName ( ) : string
Résultat string

getPreviousControllerName() public méthode

Returns the previous controller in the dispatcher
public getPreviousControllerName ( ) : string
Résultat string

getReturnedValue() public méthode

Returns value returned by the latest dispatched action
public getReturnedValue ( ) : mixed
Résultat mixed

hasParam() public méthode

public hasParam ( string $param ) : boolean
$param string
Résultat boolean

setActionName() public méthode

public setActionName ( string $actionName ) : static
$actionName string
Résultat static

setControllerName() public méthode

public setControllerName ( string $controllerName ) : static
$controllerName string
Résultat static

setParams() public méthode

public setParams ( array $params, boolean $merge = true ) : static
$params array
$merge boolean
Résultat static

wasForwarded() public méthode

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