EventDispatcher

Extends \Zend\EventManager\EventManager Implements \Psr\EventDispatcher\EventDispatcherInterface

Class EventDispatcher

package

Ascmvc\EventSourcing

Methods

EventDispatcher constructor.

__construct(\Ascmvc\AbstractApp $application, \Zend\EventManager\SharedEventManagerInterface|null $sharedEventManager = null, array $identifiers = array()) 

Arguments

$application

\Ascmvc\AbstractApp

$sharedEventManager

\Zend\EventManager\SharedEventManagerInterface|null

$identifiers

array

Dispatches the event.

dispatch(object $event) 

Arguments

$event

object

Triggers the given event.

triggerEvent(\Zend\EventManager\EventInterface $event) : \Zend\EventManager\ResponseCollection

Arguments

$event

\Zend\EventManager\EventInterface

Response

\Zend\EventManager\ResponseCollection

Trigger listeners

triggerListeners(\Zend\EventManager\EventInterface $event, null|callable $callback = null) : \Zend\EventManager\ResponseCollection

Actual functionality for triggering listeners, to which trigger() delegate.

Arguments

$event

\Zend\EventManager\EventInterface

$callback

null|callable

Response

\Zend\EventManager\ResponseCollection

Properties

The instance of the application.

application : \Ascmvc\AbstractApp
var

Type(s)

\Ascmvc\AbstractApp