EventDispatcherInterface
extends
EventDispatcherInterface
in
Allows providing hooks on domain-specific lifecycles by dispatching events.
Table of Contents
- dispatch() : object
- Dispatches an event to all registered listeners.
Methods
dispatch()
Dispatches an event to all registered listeners.
public
dispatch(object $event[, string|null $eventName = null ]) : object
Parameters
- $event : object
-
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.
Return values
object —The passed $event MUST be returned