EventDispatcher

Extends \Laminas\EventManager\EventManager Implements \Psr\EventDispatcher\EventDispatcherInterface

Class EventDispatcher

package

Ascmvc\EventSourcing

Methods

EventDispatcher constructor.

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

Arguments

$application

\Ascmvc\AbstractApp

$sharedEventManager

\Laminas\EventManager\SharedEventManagerInterface|null

$identifiers

array

Dispatches the event.

dispatch(object $event) 

Arguments

$event

object

Triggers the given event.

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

Arguments

$event

\Laminas\EventManager\EventInterface

Response

\Laminas\EventManager\ResponseCollection

Trigger listeners

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

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

Arguments

$event

\Laminas\EventManager\EventInterface

$callback

null|callable

Response

\Laminas\EventManager\ResponseCollection

Properties

The instance of the application.

application : \Ascmvc\AbstractApp
var

Type(s)

\Ascmvc\AbstractApp