Exemplo n.º 1
0
 /**
  * @param EventSubscriberInterface $subscriber
  *
  * @return $this
  */
 public function addEventSubscriber(EventSubscriberInterface $subscriber)
 {
     if ($this->eventBus === null) {
         throw new \RuntimeException('The event bus should not be null');
     }
     $this->eventBus->addSubscriber($subscriber);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @param DomainEventSubscriberInterface $subscriber
  */
 protected function addSubscriber(DomainEventSubscriberInterface $subscriber)
 {
     $this->eventBus->addSubscriber($subscriber);
 }