EventManager Interface Reference
Detailed Description
EventManager is responsible for dispatching events to registered listeners.
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
-
$eventName The event name $callback A php callback
Implemented in DefaultEventManager.
◆ removeListener()
removeListener | ( | $eventName, | |
$callback | |||
) |
Remove a listener for a given event.
- Parameters
-
$eventName The event name $callback A php callback
Implemented in DefaultEventManager.
◆ dispatch()
dispatch | ( | $eventName, | |
Event | $event | ||
) |
Notify listeners about the given event.
- Parameters
-
$eventName The event name $event An Event instance
Implemented in DefaultEventManager.