EventManager
public class EventManager
www.doctrine-project.org
Method Summary | |
---|---|
void | addEventListener(string|array events, object listener) Adds an event listener that listens on the specified events. |
void | addEventSubscriber(Doctrine\Common\EventSubscriber subscriber) Adds an EventSubscriber. |
boolean | dispatchEvent(string eventName, EventArgs eventArgs) Dispatches an event to all registered listeners. |
array | getListeners(string event) Gets the listeners of a specific event or all listeners. |
boolean | hasListeners(string event) Checks whether an event has any registered listeners. |
void | removeEventListener(string|array events, object listener) Removes an event listener from the specified events. |
public void addEventListener(string|array events, object listener)
Adds an event listener that listens on the specified events.
public void addEventSubscriber(Doctrine\Common\EventSubscriber subscriber)
Adds an EventSubscriber. The subscriber is asked for all the events he is interested in and added as a listener for these events.
public boolean dispatchEvent(string eventName, EventArgs eventArgs)
Dispatches an event to all registered listeners.
public array getListeners(string event)
Gets the listeners of a specific event or all listeners.
public boolean hasListeners(string event)
Checks whether an event has any registered listeners.
public void removeEventListener(string|array events, object listener)
Removes an event listener from the specified events.
The EventManager is the central point of Doctrine's event listener system. Listeners are registered on the manager and events are dispatched through the manager.