public function EventManager::addEventSubscriber in Plug 7
Adds an EventSubscriber. The subscriber is asked for all the events it is interested in and added as a listener for these events.
Parameters
\Doctrine\Common\EventSubscriber $subscriber The subscriber.:
Return value
void
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ EventManager.php, line 137
Class
- EventManager
- 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.
Namespace
Doctrine\CommonCode
public function addEventSubscriber(EventSubscriber $subscriber) {
$this
->addEventListener($subscriber
->getSubscribedEvents(), $subscriber);
}