Debug\TraceableEventDispatcherInterface (Component\EventDispatcher)
Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface
interface TraceableEventDispatcherInterface implements EventDispatcherInterface
Methods
Event | dispatch(string $eventName, Event $event = null) Dispatches an event to all registered listeners. | from EventDispatcherInterface |
addListener(string $eventName, callable $listener, int $priority) Adds an event listener that listens on the specified events. | from EventDispatcherInterface | |
addSubscriber(EventSubscriberInterface $subscriber) Adds an event subscriber. | from EventDispatcherInterface | |
removeListener(string $eventName, callable $listener) Removes an event listener from the specified events. | from EventDispatcherInterface | |
removeSubscriber(EventSubscriberInterface $subscriber) Removes an event subscriber. | from EventDispatcherInterface | |
array | getListeners(string $eventName = null) Gets the listeners of a specific event or all listeners. | from EventDispatcherInterface |
bool | hasListeners(string $eventName = null) Checks whether an event has any registered listeners. | from EventDispatcherInterface |
array | getCalledListeners() Gets the called listeners. | |
array | getNotCalledListeners() Gets the not called listeners. |
Details
public Event dispatch(string $eventName, Event $event = null)
Dispatches an event to all registered listeners.
public addListener(string $eventName, callable $listener, int $priority)
Adds an event listener that listens on the specified events.
public 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.
public removeListener(string $eventName, callable $listener)
Removes an event listener from the specified events.
public removeSubscriber(EventSubscriberInterface $subscriber)
Removes an event subscriber.
public array getListeners(string $eventName = null)
Gets the listeners of a specific event or all listeners.
public bool hasListeners(string $eventName = null)
Checks whether an event has any registered listeners.
public array getCalledListeners()
Gets the called listeners.
public array getNotCalledListeners()
Gets the not called listeners.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.html