TraceableEventDispatcher
class TraceableEventDispatcher implements TraceableEventDispatcherInterface
Collects some data about event listeners.
This event dispatcher delegates the dispatching to another one.
Methods
Constructor.
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.
Gets the called listeners.
Gets the not called listeners.
Proxies all method calls to the original event dispatcher.
Details
at line line 43
__construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null)
Constructor.
at line line 55
addListener(string $eventName, callable $listener, int $priority)
Adds an event listener that listens on the specified events.
at line line 63
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 71
removeListener(string $eventName, callable $listener)
Removes an event listener from the specified events.
at line line 89
removeSubscriber(EventSubscriberInterface $subscriber)
Removes an event subscriber.
at line line 97
array
getListeners(string $eventName = null)
Gets the listeners of a specific event or all listeners sorted by descending priority.
at line line 105
getListenerPriority($eventName, $listener)
{@inheritdoc}
at line line 113
bool
hasListeners(string $eventName = null)
Checks whether an event has any registered listeners.
at line line 121
Event
dispatch(string $eventName, Event $event = null)
Dispatches an event to all registered listeners.
at line line 147
array
getCalledListeners()
Gets the called listeners.
at line line 163
array
getNotCalledListeners()
Gets the not called listeners.
at line line 210
mixed
__call(string $method, array $arguments)
Proxies all method calls to the original event dispatcher.