Run Route Command; Controller or Closure

@param $command
@param $params
@return null
493456
private function runRouteCommand($command, $params = null)
    {
        $this->routerCommand()->runRoute(
            $command,
            $params,
            $this->baseFolder . '/' . $this->paths['controllers'],
            $this->namespaces['controllers']
        );
    }
776095
public function runCommand(Command $command, InputInterface $input, OutputInterface $output) {
    return $this->doRunCommand($command, $input, $output);
  }
1290792
public function call($command, array $parameters = [])
    {
        $this->bootstrap();

        return $this->getArtisan()->call($command, $parameters);
    }
1225703
public function get($command = null)
    {
        if (isset($command)) {
            $routes = $this->getList();
            return isset($routes[$command]) ? $routes[$command] : array();
        }

        return $this->route;
    }
983334
private static function execute(&$route, $params)
    {
        array_shift($params);

        if (static::runAppMiddleware() && static::runRouteMiddleware($route)) {
            static::prepare($route, $params);

            return true;
        }
    }
562619
public function command($command, array $parameters = [])
    {
        if (class_exists($command)) {
            $command = Container::getInstance()->make($command)->getName();
        }

        return $this->exec(
            Application::formatCommandString($command), $parameters
        );
    }
934413
public function execute($command, $params = null)
    {
        $url = $command;

        if (substr($url, -1) !== '/') {
            $url .= '/';
        }

        if ($params) {
            $parameters = array();
            foreach ($params as $k => $v) {
                if (strlen($v)) {
                    $parameters[] = urlencode($k) . '=' . urlencode($v);
                } else {
                    $parameters[] = urlencode($k);
                }
            }
            $url .= '?' . implode('&', $parameters);
        }

        try {
            $response = $this->client->get($url);
        } catch (\Exception $e) {
            return null;
        }
        $this->checkError($response, $url);

        return $response->getBody();
    }
459039
public function call($command, array $parameters = [], $outputBuffer = null)
    {
        return $this->app->call($command, $parameters, $outputBuffer);
    }
776581
public function runWithParams($params)
    {
        $args = $this->controller->bindActionParams($this, $params);
        Log::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()' . __METHOD__);
        if (Zilf::$app->requestedParams === null) {
            Zilf::$app->requestedParams = $args;
        }

        return call_user_func_array([$this->controller, $this->actionMethod], $args);
    }
504608
public function run($commands, Closure $callback = null)
    {
        $commands = (array) $commands;
        $commands = implode(' && ', $commands);

        $this->previousStatus = 0;
        $process = new Process($commands);
        $process->setIdleTimeout(60 * 60);
        $process->run(function ($type, $line) use ($callback) {
            $callback($line);
        });

        $this->previousStatus = $process->getExitCode();
    }
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);
        }
    }
716149
public function runCommand($command, OutputInterface $output = null)
    {
        $input = new StringInput($command);

        $command = $this->find($this->getCommandName($input));

        return $command->run($input, $output ?: new NullOutput());
    }
618732
public function execute(interfaces\commands\Command $command)
    {
        $handler = $this->resolver->resolve($command);
        
        return call_user_func([$handler, 'handle'], $command);
    }
1042761
public function visit(
        CommandInterface $command,
        RequestInterface $request,
        Parameter $param
    ) {
        $uri = $request->getUri();
        $query = Psr7\parse_query($uri->getQuery());

        $query[$param->getWireName()] = $this->prepareValue(
            $command[$param->getName()],
            $param
        );

        $uri = $uri->withQuery($this->querySerializer->aggregate($query));

        return $request->withUri($uri);
    }
1333324
private function runRemote($command) {
		// make commands a list
		if (!is_array($command))
			$command = array($command);
		$command = strval(implode(';', $command));
		
		return $this->runLocal(['plink',
					'-ssh',					// interacting method
					'-i', static::safeDir($this->ppk),		// Private key file to access server
					$this->host,			// username and hostname to connect to
			
					'"' . $command . '"',	// Commands to run
		]);
	}
419878
protected function executeCommand(
        $command,
        array $parameters = []
    ) {
        $environment = $this
            ->application
            ->getKernel()
            ->getEnvironment();

        $this
            ->application
            ->run(new ArrayInput(array_merge(
                [
                    'command'          => $command,
                    '--no-interaction' => true,
                    '--env'            => $environment,
                    '--quiet'          => true,
                ], $parameters
            )));

        return $this;
    }
695448
public function run($params = null)
    {
        $this->parser = new Parser($this->paths);

        try {
            $argc = ($params === null) ? null : count($params);
            $this->result = $this->parser->parse($argc, $params);
        } catch (\Exception $e) {
            $this->parser->displayError($e->getMessage());
        }

        $this->parse();
    }