コード例 #1
0
ファイル: Dispatcher.php プロジェクト: inoplate/foundation
 /**
  * Dispatch command
  * 
  * @param  DTO              $command
  * @param  Closure|null     $afterResolving
  * @return void
  */
 public function dispatch($command, Closure $afterResolving = null)
 {
     if ($this->commandShouldBeQueued($command)) {
         $this->dispatcher->dispatchToQueue($command);
     } else {
         $this->dispatcher->dispatchNow($command, $afterResolving);
     }
 }