Exemple #1
0
 /**
  * @param EventMessageInterface[] $events
  */
 protected function dispatchEvents(array $events)
 {
     foreach ($events as $event) {
         if ($this->eventStore) {
             $this->eventStore->store($event);
         }
         $this->eventBus->publish($event);
     }
 }
Exemple #2
0
 /**
  * @param EventMessageInterface $event
  */
 public function store(EventMessageInterface $event)
 {
     if ($this->filter->isValid($event)) {
         $this->eventStore->store($event);
     }
 }