src/Event/Dispatcher.php
public function addSubscriber(SubscriberInterface $subscriber)
    {
        foreach ($subscriber->getSubscribedEvents() as $eventName => $callable) {
            $this->addListener($eventName, $callable);
        }
    }
public function addSubscriber(SubscriberInterface $subscriber)
    {
        foreach ($subscriber->getSubscribedEvents() as $eventName => $callable) {
            $this->addListener($eventName, $callable);
        }
    }
public function addSubscriber ( SubscriberInterface $ subscriber ) { foreach ( $ subscriber -> getSubscribedEvents ( ) as $ eventName => $ callable ) { $ this -> addListener ( $ eventName , $ callable ) ; } }
Adds a subscriber to this dispatcher which in its turn adds all the subscribed events.

@param SubscriberInterface $subscriber The subscriber which can subscribe to multiple events
Adds a subscriber to this dispatcher which in its turn adds all the subscribed events .