ImmutableEventDispatcher
class ImmutableEventDispatcher implements EventDispatcherInterface
A read-only proxy for an event dispatcher.
Methods
Creates an unmodifiable proxy for an event dispatcher.
Adds an event listener that listens on the specified events.
Removes an event listener from the specified events.
Gets the listeners of a specific event or all listeners sorted by descending priority.
{@inheritdoc}
Checks whether an event has any registered listeners.
Details
at line line 33
__construct(EventDispatcherInterface $dispatcher)
Creates an unmodifiable proxy for an event dispatcher.
at line line 41
Event
dispatch(string $eventName, Event $event = null)
Dispatches an event to all registered listeners.
at line line 49
addListener(string $eventName, callable $listener, int $priority)
Adds an event listener that listens on the specified events.
at line line 57
addSubscriber(EventSubscriberInterface $subscriber)
Adds an event subscriber.
The subscriber is asked for all the events he is interested in and added as a listener for these events.
at line line 65
removeListener(string $eventName, callable $listener)
Removes an event listener from the specified events.
at line line 73
removeSubscriber(EventSubscriberInterface $subscriber)
Removes an event subscriber.
at line line 81
array
getListeners(string $eventName = null)
Gets the listeners of a specific event or all listeners sorted by descending priority.
at line line 89
getListenerPriority($eventName, $listener)
{@inheritdoc}
at line line 97
bool
hasListeners(string $eventName = null)
Checks whether an event has any registered listeners.