/** * {@inheritdoc} */ public function dispatch($command, Closure $afterResolving = null) { if ($this->queueResolver && $this->commandShouldBeQueued($command)) { return $this->dispatchToQueue($command); } return parent::dispatch($command, $afterResolving); }
public static function registerBusDispatcher(ContainerInterface $container) { $bus = new Dispatcher($container); $bus->setContainer($container); return $bus; }