コード例 #1
0
 protected function publish()
 {
     foreach ($this->transactionMessages as $message) {
         $this->locator->getPublisherForMessage($message)->publish($message);
     }
     $this->transactionMessages = [];
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function execute($command, callable $next)
 {
     if (!$command instanceof Message) {
         return $next($command);
     }
     return $this->locator->getPublisherForMessage($command)->publish($command);
 }