category Zend
package Zend_Mvc
subpackage Controller

 Methods

Dispatch another controller

dispatch(string $name, array $params) : mixed

Parameters

$name

string

Controller name; either a class name or an alias used in the DI container or service locator

$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\AbstractPlugin::getController()

Returns

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\AbstractPlugin::setController()

Parameters

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

setListenersToDetach(array $listeners) : void

Parameters

$listeners

array

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

Set maximum number of nested forwards allowed

setMaxNestedForwards(int $maxNestedForwards) : \Zend\Mvc\Controller\Plugin\Forward

Parameters

$maxNestedForwards

int

Returns

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

Get the locator

getLocator() : \Zend\ServiceManager\ServiceLocatorInterface

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
Inherited

inherited_from \Zend\Mvc\Controller\Plugin\AbstractPlugin::$$controller
 

$event

$event : \Zend\Mvc\MvcEvent

 

$listenersToDetach

$listenersToDetach : array

   

$maxNestedForwards

$maxNestedForwards : int

 

$numNestedForwards

$numNestedForwards : int