/**
  * {@inheritdoc}
  */
 public function subscribe(SubscriberInterface $subscriber)
 {
     foreach ($subscriber->getSubscriptions() as $subscription) {
         $this->eventDispatcher->addListener($subscription[0], function (GenericEvent $event) use($subscription) {
             call_user_func($subscription[1], $event->getSubject());
         }, isset($subscription[2]) ? $subscription[2] : 0);
     }
     return $this;
 }
 /**
  * {@inheritdoc}
  */
 public function subscribe(SubscriberInterface $subscriber)
 {
     foreach ($subscriber->getSubscriptions() as $subscription) {
         $this->eventManager->attach($subscription[0], function (Event $event) use($subscription) {
             call_user_func($subscription[1], $event->getTarget());
         }, isset($subscription[2]) ? $subscription[2] : 0);
     }
     return $this;
 }