ZF\Console\Application::processRun PHP Method

processRun() protected method

If arguments are provided, but no routes match, displays a usage message and returns a status of 1. Otherwise, attempts to dispatch the matched command, returning the execution status.
protected processRun ( array $args ) : integer
$args array
return integer
    protected function processRun(array $args)
    {
        if (empty($args)) {
            $this->showMessage($this->banner);
            $this->showUsageMessage();
            return 0;
        }
        $route = $this->routeCollection->match($args);
        if (!$route instanceof Route) {
            $this->showMessage($this->banner);
            $name = $args[0];
            $route = $this->routeCollection->getRoute($name);
            if (!$route instanceof Route) {
                $this->showUnmatchedRouteMessage($args);
                return 1;
            }
            $this->showUsageMessageForRoute($route, true);
            return 1;
        }
        if (!$this->bannerDisabledForUserCommands) {
            $this->showMessage($this->banner);
        }
        return $this->dispatcher->dispatch($route, $this->console);
    }