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::dispatch()

Event dispatch(string $eventName, Event $event = null) Dispatches an event to all registered listeners. Parameters string $eventName The name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners. Event $event The event to pass to the event handlers/listeners If not supplied, an empty Event instance is created. Return Value Event

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)

EventDataCollector::getNotCalledListeners()

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

EventDataCollector::setNotCalledListeners()

setNotCalledListeners(array $listeners) Sets the not called listeners. Parameters array $listeners 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::lateCollect()

lateCollect() Collects data as late as possible.

EventDataCollector::setCalledListeners()

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

EventDataCollector

class EventDataCollector extends DataCollector implements LateDataCollectorInterface EventDataCollector. Methods serialize() from DataCollector unserialize($data) from DataCollector __construct(EventDispatcherInterface $dispatcher = null) collect(Request $request, Response $response, Exception $exception = null) Collects data for the given Request and Response. lateCollect() Collects data as late as possible. setCalledListeners(array $listeners) Sets the called