EventDispatcherInterface
extends
EventDispatcherInterface
in
Allows providing hooks on domain-specific lifecycles by dispatching events.
Table of Contents
Methods
- dispatch() : T
- Dispatches an event to all registered listeners.
Methods
dispatch()
Dispatches an event to all registered listeners.
public
dispatch(T $event[, string|null $eventName = null ]) : T
Parameters
- $event : T
-
The event to pass to the event handlers/listeners
- $eventName : string|null = null
-
The name of the event to dispatch. If not supplied, the class of $event should be used instead.
Tags
Return values
T —The passed $event MUST be returned