Exemplo n.º 1
0
 /**
  * @param DomainEventInterface $event
  */
 protected function recordApplyAndPublishEvent(DomainEventInterface $event)
 {
     Validator::assert($event);
     $this->version()->increment(VersionIncrementType::PATCH());
     $event->setVersion($this->version()->patch());
     $this->recordEvent($event);
     $this->applyEvent($event);
     $this->publishEvent($event);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function handle($message, callable $next)
 {
     Validator::assert($message);
     $next($message);
 }