$dispatcher
$dispatcher :
A read-only proxy for an event dispatcher.
__construct(\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher)
| \Symfony\Component\EventDispatcher\EventDispatcherInterface | $dispatcher |
addListener(\Symfony\Component\EventDispatcher\string $eventName, callable $listener, \Symfony\Component\EventDispatcher\int $priority)
Adds an event listener that listens on the specified events.
| \Symfony\Component\EventDispatcher\string | $eventName | |
| callable | $listener | The listener |
| \Symfony\Component\EventDispatcher\int | $priority | The higher this value, the earlier an event listener will be triggered in the chain (defaults to 0) |
addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber)
Adds an event subscriber.
The subscriber is asked for all the events it is interested in and added as a listener for these events.
| \Symfony\Component\EventDispatcher\EventSubscriberInterface | $subscriber |
removeSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber)
| \Symfony\Component\EventDispatcher\EventSubscriberInterface | $subscriber |
getListeners(\Symfony\Component\EventDispatcher\string $eventName = null) : array
Gets the listeners of a specific event or all listeners sorted by descending priority.
| \Symfony\Component\EventDispatcher\string | $eventName |
The event listeners for the specified event, or all event listeners by event name
getListenerPriority(\Symfony\Component\EventDispatcher\string $eventName, callable $listener) : integer|null
Gets the listener priority for a specific event.
Returns null if the event or the listener does not exist.
| \Symfony\Component\EventDispatcher\string | $eventName | |
| callable | $listener | The listener |
The event listener priority