API Documentation (v0.9.0-alpha)

Avolutions\Event\EventDispatcher

The EventDispatcher is responsible to call all relevant listener for the dispatched Event.

Methods

Method Visibility Description
__construct() public Creates a new EventDispatcher instance.
dispatch() public Find and calls all relevant listener from the ListenerCollection for the passed Event.

Method Details

__construct()

Creates a new EventDispatcher instance.

public __construct(Application $Application, ListenerCollection $ListenerCollection) : mixed
Parameters

Application $Application

ListenerCollection $ListenerCollection

dispatch()

Find and calls all relevant listener from the ListenerCollection for the passed Event.

public dispatch(Event $Event) : mixed
Parameters

Event $Event
The Event to dispatch

Return values
mixed Find and calls all relevant listener from the ListenerCollection for the passed Event.