EventDispatcher::addSubscriber()

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. Parameters EventSubscriberInterface $subscriber The subscriber

EventDispatcher::addListener()

addListener(string $eventName, callable $listener, int $priority) Adds an event listener that listens on the specified events. Parameters string $eventName The event to listen on callable $listener The listener int $priority The higher this value, the earlier an event listener will be triggered in the chain (defaults to 0)

EventDispatcher

class EventDispatcher implements EventDispatcherInterface The EventDispatcherInterface is the central point of Symfony's event listener system. Listeners are registered on the manager and events are dispatched through the manager. Methods Event dispatch(string $eventName, Event $event = null) Dispatches an event to all registered listeners. array getListeners(string $eventName = null) Gets the listeners of a specific event or all listeners sorted by descending priority. int|null

EventDataCollector::setNotCalledListeners()

setNotCalledListeners(array $listeners) Sets the not called listeners. Parameters array $listeners An array of not called listeners See also TraceableEventDispatcherInterface

EventDataCollector::setCalledListeners()

setCalledListeners(array $listeners) Sets the called listeners. Parameters array $listeners An array of called listeners See also TraceableEventDispatcherInterface

EventDataCollector::lateCollect()

lateCollect() Collects data as late as possible.

EventDataCollector::getNotCalledListeners()

array getNotCalledListeners() Gets the not called listeners. Return Value array An array of not called listeners See also TraceableEventDispatcherInterface

EventDataCollector::getName()

string getName() Returns the name of the collector. Return Value string The collector name

EventDataCollector::getCalledListeners()

array getCalledListeners() Gets the called listeners. Return Value array An array of called listeners See also TraceableEventDispatcherInterface

EventDataCollector::collect()

collect(Request $request, Response $response, Exception $exception = null) Collects data for the given Request and Response. Parameters Request $request A Request instance Response $response A Response instance Exception $exception An Exception instance