PHP Class Zend\Mvc\Controller\Plugin\Forward

Inheritance: extends Zend\Mvc\Controller\Plugin\AbstractPlugin
Exibir arquivo Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Property Type Description
$controllers Zend\Mvc\Controller\ControllerManager
$event Zend\Mvc\MvcEvent
$listenersToDetach array[] | null
$maxNestedForwards integer
$numNestedForwards integer

Public Methods

Method Description
__construct ( ControllerManager $controllers )
dispatch ( string $name, array $params = null ) : mixed Dispatch another controller
getListenersToDetach ( ) : array Get information on listeners that need to be detached before dispatching.
setListenersToDetach ( array $listeners ) : self Set information on listeners that need to be detached before dispatching.
setMaxNestedForwards ( integer $maxNestedForwards ) : self Set maximum number of nested forwards allowed

Protected Methods

Method Description
detachProblemListeners ( Zend\EventManager\SharedEventManagerInterface $sharedEvents ) : array Detach problem listeners specified by getListenersToDetach() and return an array of information that will allow them to be reattached.
getEvent ( ) : MvcEvent Get the event
reattachProblemListeners ( Zend\EventManager\SharedEventManagerInterface $sharedEvents, array $listeners ) : void Reattach all problem listeners detached by detachProblemListeners(), if any.

Private Methods

Method Description
detachSharedListener ( string | integer $id, callable | Zend\Stdlib\CallbackHandler $listener, Zend\EventManager\SharedEventManagerInterface $sharedEvents ) : void Detach a shared listener by identifier.
getSharedListenersById ( string | integer $id, string $event, Zend\EventManager\SharedEventManagerInterface $sharedEvents ) : array | Traversable Retrieve shared listeners for an event by identifier.

Method Details

__construct() public method

public __construct ( ControllerManager $controllers )
$controllers Zend\Mvc\Controller\ControllerManager

detachProblemListeners() protected method

Detach problem listeners specified by getListenersToDetach() and return an array of information that will allow them to be reattached.
protected detachProblemListeners ( Zend\EventManager\SharedEventManagerInterface $sharedEvents ) : array
$sharedEvents Zend\EventManager\SharedEventManagerInterface Shared event manager
return array

dispatch() public method

Dispatch another controller
public dispatch ( string $name, array $params = null ) : mixed
$name string Controller name; either a class name or an alias used in the controller manager
$params array Parameters with which to seed a custom RouteMatch object for the new controller
return mixed

getEvent() protected method

Get the event
protected getEvent ( ) : MvcEvent
return Zend\Mvc\MvcEvent

getListenersToDetach() public method

Each entry in the array contains three keys: id (identifier for event-emitting component), event (the hooked event) and class (the class of listener that should be detached).
public getListenersToDetach ( ) : array
return array

reattachProblemListeners() protected method

Reattach all problem listeners detached by detachProblemListeners(), if any.
protected reattachProblemListeners ( Zend\EventManager\SharedEventManagerInterface $sharedEvents, array $listeners ) : void
$sharedEvents Zend\EventManager\SharedEventManagerInterface Shared event manager
$listeners array Output of detachProblemListeners()
return void

setListenersToDetach() public method

Set information on listeners that need to be detached before dispatching.
public setListenersToDetach ( array $listeners ) : self
$listeners array Listener information; see getListenersToDetach() for details on format.
return self

setMaxNestedForwards() public method

Set maximum number of nested forwards allowed
public setMaxNestedForwards ( integer $maxNestedForwards ) : self
$maxNestedForwards integer
return self

Property Details

$controllers protected_oe property

protected ControllerManager,Zend\Mvc\Controller $controllers
return Zend\Mvc\Controller\ControllerManager

$event protected_oe property

protected MvcEvent,Zend\Mvc $event
return Zend\Mvc\MvcEvent

$listenersToDetach protected_oe property

protected array[]|null $listenersToDetach
return array[] | null

$maxNestedForwards protected_oe property

protected int $maxNestedForwards
return integer

$numNestedForwards protected_oe property

protected int $numNestedForwards
return integer