\Pivot\Events\MediatorEventDispatcher

EventDispatcher

Summary

Methods
Properties
Constants
__construct()
addSubscriber()
addListener()
dispatch()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$listeners
$serviceLocator
N/A

Properties

$listeners

$listeners : array

Collection off listeners

Type

array

$serviceLocator

$serviceLocator : \Pivot\Events\Mediator\Pivot\Core\Services\ServiceLocator

Pivot Service Locator

Type

\Pivot\Events\Mediator\Pivot\Core\Services\ServiceLocator

Methods

addListener()

addListener(mixed  $listener, array  $events) : \Pivot\Events\Mediator\EventDispatcherInterface

Add an event listener

Parameters

mixed $listener

Thing listening to the event

array $events

Events to subscribe to

Returns

\Pivot\Events\Mediator\EventDispatcherInterface

dispatch()

dispatch(string  $event, mixed  $data = array()) : \Pivot\Events\Mediator\Event

[dispatch description]

Parameters

string $event

Event to dispatch

mixed $data

Data to include with the event

Returns

\Pivot\Events\Mediator\Event —

response