Dispatches the command handler.
@param string $call The command handler to execute.
@return void
@throws CommandNotFoundException
482886
public function dispatch($call = null)
    {
        $command = $this->routes->get($this->arguments->getCommand(1), false);
        if ($this->routes->get($call, false)) {
            $command = $this->routes->get($call, false);
        }
        if ($command) {
            $handler = new ClassMethodHandler($command, $this->arguments);
            return $handler->call($this->arguments);
        }
        throw new CommandNotFoundException(sprintf('Command %s is not registered.', $call));
    }
1243816
public function dispatch($command): void
    {
        $this->commandStack[] = $command;

        if ($this->executing) {
            return;
        }

        $this->transactionManager->begin();
        try {
            while ($command = array_shift($this->commandStack)) {
                $this->invokeHandler($command);
            }
            $this->eventPublisher->publishEvents();
            $this->transactionManager->commit();
        } catch (Exception $e) {
            $this->transactionManager->rollback();
            throw $e;
        }
    }
1074750
public function eventCall()
    {
        try {
            //Daemon::log('cb - '.Debug::zdump($this->cb));
            $func = $this->cb;
            $func($this);
        } catch (\Exception $e) {
            Daemon::uncaughtExceptionHandler($e);
        }
    }
123207
public function dispatch($command, Closure $afterResolving = null)
	{
		// fire any registered events before command
		$this->fireBeforeCommandEvent($command);

		// validate command with registered validator
		$this->validate($command);
		
		// dispatch the command
		$result = parent::dispatch($command, $afterResolving);
		
		// fire any registered events after command
		$this->fireAfterCommandEvent($command, $result);

		// return the handler result
		return $result;
	}
883110
private function dispatch($call)
    {

        $path = $call->getAction();
        $method = $call->getMethod();

        $matches = preg_split('/(?=[A-Z])/',$path);
        $route = strtolower(implode('/', $matches));
        $route .= "/".$method;

        $request = $this->app['request'];

        $files = $this->fixFiles($request->files->all());

        // create the route request
        $routeRequest = Request::create($route, 'POST', $call->getData(), $request->cookies->all(), $files, $request->server->all());

        if ('form' == $this->request->getCallType()) {
            $result = $this->app->handle($routeRequest, HttpKernelInterface::SUB_REQUEST);

            $response = $call->getResponse($result);
        } else {
            try{
                $result = $this->app->handle($routeRequest, HttpKernelInterface::SUB_REQUEST);

                $response = $call->getResponse($result);
            }catch(\Exception $e){
                $response = $call->getException($e);
            }            
        }

        return $response;
    }
272533
public static function dispatch(string $className, object $object = null) : void
    {
        /** @var EventInterface $className */
        static::eventClassCheck($className);
        $className::dispatch($object);
    }
160180
public function run($commands, Closure $callback = null)
    {
        foreach ($this->connections as $connection) {
            $connection->run($commands, $callback);
        }
    }
750570
public function dispatch(Command $command)
    {
        // If beforeCommand fails abort
        if ($this->_eventsManager->fire('command:beforeCommand', $command) === false) {
            return false;
        }

        // If run the commands fails abort too
        if ($command->run($command->getParameters()) === false) {
            return false;
        }

        $this->_eventsManager->fire('command:afterCommand', $command);

        return true;
    }
983799
public function fireUpdatingCommand(Command $command)
    {
        $this->handleMainCommand($command);

        event(new SystemWasUpdatedEvent());

        $command->info('System was updated!');
    }
737945
public function handle()
    {

        // Ask what command
        $command = $this->choice('What command are you running?', $this->availableCommands->toArray());

        if (!$this->availableCommands->has($command)) {
            $this->info('The specified command does not exist.');
            return;
        }

        $method = 'make' . ucfirst($command);
        call_user_func([$this, $method]);

        $this->call('make:'. $command, $this->options);
    }
285224
private function call($command)
    {
        if (!in_array($command, static::COMMAND)) {
            $this->throwFailsCommand("The command '$command' not exists.", 'help');
        }

        if (!$this->arg->getParameter('action')) {
            if ($this->arg->getParameter('target') == 'help') {
                $this->help($command);

                exit(0);
            }
        }

        try {
            call_user_func_array(
                [$this, $command],
                [$this->arg->getParameter('target')]
            );
        } catch (\Exception $e) {
            echo $e->getMessage();

            exit(1);
        }
    }
1330302
public function handle(AbstractCommand $command)
    {
        $this->commandDispatcher->handle($command);
        // Now that the command is handled, let's found if there is some events to publish
        $events = $this->extractEventsFromCommand($command);
        foreach ($events as $event) {
            // we will only publish event to synchronous listeners
            $this->publish($event);
        }

        return $command;
    }
751412
public function handle()
    {
        parent::handle();

        $requestGenerator = new RequestGenerator($this->commandData);
        $requestGenerator->generate();

        $this->performPostActions();
    }
834187
public function execute($command, callable $next)
    {
        $migration = $command->getMigration();
        if (!$migration instanceof TransactionAwareInterface) {
            $next($command);
            return;
        }

        $result = null;
        try {
            $migration->begin();
            $next($command);
            $migration->finish();
        } catch (\Exception $e) {
            $migration->abort($e);
        }
    }
1306117
def dispatch_command(self, command, params=None):
        """"""
        try:
            if command in self.handlers:
                self.handlers[command](**params)
            else:
                logging.warning('Unsupported command: %s: %s',
                                command, params)
        except Exception as e:
            logging.warning('Error during command execution',
                            exc_info=sys.exc_info())
            raise e
318941
protected function runCommandInForeground()
	{
		$this->callBeforeCallbacks();

		( new Process( trim( $this->buildCommand(), '& ' ), base_path(), null, null, null ) )->run();

		$this->callAfterCallbacks();
	}
582021
public function handle()
    {
        parent::handle();

        $viewGenerator = new ViewGenerator($this->commandData);
        $viewGenerator->generate();

        $this->performPostActions();
    }