EventListener

Implements \Ascmvc\EventSourcing\EventListenerInterface

Class EventListener

package

Ascmvc\EventSourcing

Methods

EventListener constructor.

__construct(\Ascmvc\EventSourcing\EventDispatcher $eventDispatcher) 

Arguments

Runs the EventListener class as a function.

__invoke(\Ascmvc\EventSourcing\Event\Event $event) : \Generator

Arguments

Response

\Generator

Returns an instance of this class.

getInstance(\Ascmvc\EventSourcing\EventDispatcher $eventDispatcher) : \Ascmvc\EventSourcing\EventListener
static

Event listener method.

onEvent(\Ascmvc\EventSourcing\Event\Event $event) : \Generator

Arguments

Response

\Generator

Properties

Contains an instance of the \Ascmvc\EventSourcing\EventDispatcher

eventDispatcher : \Ascmvc\EventSourcing\EventDispatcher