EventManager Interface Reference

Detailed Description

EventManager is responsible for dispatching events to registered listeners.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 21 of file EventManager.php.

+ Inheritance diagram for EventManager:

Public Member Functions

 addListener ($eventName, $callback)
 
 removeListener ($eventName, $callback)
 
 dispatch ($eventName, Event $event)
 

Member Function Documentation

◆ addListener()

addListener (   $eventName,
  $callback 
)

Register a listener for a given event.

Parameters
$eventNameThe event name
$callbackA php callback

Implemented in DefaultEventManager.

◆ removeListener()

removeListener (   $eventName,
  $callback 
)

Remove a listener for a given event.

Parameters
$eventNameThe event name
$callbackA php callback

Implemented in DefaultEventManager.

◆ dispatch()

dispatch (   $eventName,
Event  $event 
)

Notify listeners about the given event.

Parameters
$eventNameThe event name
$eventAn Event instance

Implemented in DefaultEventManager.