Abstract aggregate listener

package Default
inherited_from \Zend\EventManager\AbstractListenerAggregate

 Methods

Attach the aggregate to the specified event manager

attach(\Zend\EventManager\EventManagerInterface $events) : void

Parameters

$events

\Zend\EventManager\EventManagerInterface

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) 
Inherited
inherited_from \Zend\EventManager\ListenerAggregateInterface::detach()

Parameters

$events

Get the send response event

getEvent() : \Zend\Mvc\ResponseSender\SendResponseEvent

Returns

\Zend\Mvc\ResponseSender\SendResponseEvent

Retrieve the event manager

getEventManager() : \Zend\EventManager\EventManagerInterface

Lazy-loads an EventManager instance if none registered.

Returns

\Zend\EventManager\EventManagerInterface

Send the response

sendResponse(\Zend\Mvc\MvcEvent $e) : void

Parameters

$e

\Zend\Mvc\MvcEvent

Set the send response event

setEvent(\Zend\Mvc\ResponseSender\SendResponseEvent $e) : \Zend\Mvc\ResponseSender\SendResponseEvent

Parameters

$e

\Zend\Mvc\ResponseSender\SendResponseEvent

Returns

\Zend\Mvc\ResponseSender\SendResponseEvent

Inject an EventManager instance

setEventManager(\Zend\EventManager\EventManagerInterface $eventManager) : \Zend\Mvc\SendResponseListener
inherited_from \Zend\EventManager\EventManagerAwareInterface::setEventManager()

Parameters

$eventManager

\Zend\EventManager\EventManagerInterface

Returns

\Zend\Mvc\SendResponseListener

Register the default event listeners

attachDefaultListeners() : \Zend\Mvc\SendResponseListener

The order in which the response sender are listed here, is by their usage: PhpEnvironmentResponseSender has highest priority, because it's used most often. ConsoleResponseSender and SimpleStreamResponseSender are not used that often, yo they have a lower priority. You can attach your response sender before or after every default response sender implementation. All default response sender implementation have negative priority. You are able to attach listeners without giving a priority and your response sender would be first to try.

Returns

\Zend\Mvc\SendResponseListener

 Properties

 

$event

$event : \Zend\Mvc\ResponseSender\SendResponseEvent

Default

 

$eventManager

$eventManager : \Zend\EventManager\EventManagerInterface

Default

 

$listeners

$listeners : array<mixed,\Zend\Stdlib\CallbackHandler>

Default

array()