package Default
inherited_from \Zend\Mvc\Controller\Plugin\AbstractPlugin

 Methods

__construct()

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

Parameters

$controllers

\Zend\Mvc\Controller\ControllerManager

Dispatch another controller

dispatch(string $name, null|array $params = null) : mixed

Parameters

$name

string

Controller name; either a class name or an alias used in the controller manager

$params

nullarray

Parameters with which to seed a custom RouteMatch object for the new controller

Exceptions

\Zend\Mvc\Exception\DomainException if composed controller does not define InjectApplicationEventInterface or Locator aware; or if the discovered controller is not dispatchable

Returns

mixed

Get the current controller instance

getController() : null | \Zend\Stdlib\DispatchableInterface
Inherited
inherited_from \Zend\Mvc\Controller\Plugin\PluginInterface::getController()

Returns

null\Zend\Stdlib\DispatchableInterface

Get information on listeners that need to be detached before dispatching.

getListenersToDetach() : array

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).

Returns

array

Set the current controller instance

setController(\Zend\Stdlib\DispatchableInterface $controller) : void
Inherited
inherited_from \Zend\Mvc\Controller\Plugin\PluginInterface::setController()

Parameters

$controller

\Zend\Stdlib\DispatchableInterface

Set information on listeners that need to be detached before dispatching.

setListenersToDetach(array $listeners) : \Zend\Mvc\Controller\Plugin\Forward
fluent This method is part of a fluent interface and will return the same instance

Parameters

$listeners

array

Listener information; see getListenersToDetach() for details on format.

Returns

\Zend\Mvc\Controller\Plugin\Forward

Set maximum number of nested forwards allowed

setMaxNestedForwards(integer $maxNestedForwards) : \Zend\Mvc\Controller\Plugin\Forward
fluent This method is part of a fluent interface and will return the same instance

Parameters

$maxNestedForwards

integer

Returns

\Zend\Mvc\Controller\Plugin\Forward

Detach problem listeners specified by getListenersToDetach() and return an array of information that will allow them to be reattached.

detachProblemListeners(\Zend\EventManager\SharedEventManagerInterface $sharedEvents) : array

Parameters

$sharedEvents

\Zend\EventManager\SharedEventManagerInterface

Shared event manager

Returns

array

Get the event

getEvent() : \Zend\Mvc\MvcEvent

Exceptions

\Zend\Mvc\Exception\DomainException if unable to find event

Returns

\Zend\Mvc\MvcEvent

Reattach all problem listeners detached by detachProblemListeners(), if any.

reattachProblemListeners(\Zend\EventManager\SharedEventManagerInterface $sharedEvents, array $listeners) : void

Parameters

$sharedEvents

\Zend\EventManager\SharedEventManagerInterface

Shared event manager

$listeners

array

Output of detachProblemListeners()

 Properties

 

$controller

$controller : null | \Zend\Stdlib\DispatchableInterface

Default

 

$controllers

$controllers : \Zend\Mvc\Controller\ControllerManager

Default

 

$event

$event : \Zend\Mvc\MvcEvent

Default

 

$listenersToDetach

$listenersToDetach : array<mixed,array> | null

Default

null
 

$maxNestedForwards

$maxNestedForwards : integer

Default

10
 

$numNestedForwards

$numNestedForwards : integer

Default

0