예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function execute(Command $command)
 {
     $handler = $this->resolver->resolve($command);
     try {
         $handler->handle($command);
     } catch (Exception $exception) {
         throw CommandException::create($exception->getMessage(), $exception);
     }
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function process(CommandMessage $message, callable $next)
 {
     $command = $message->payload();
     $handler = $this->resolver->resolve($command);
     $handler->handle($command);
 }