Cake\Console\ShellDispatcher::_dispatch PHP Method

_dispatch() protected method

Dispatch a request.
protected _dispatch ( array $extra = [] ) : boolean
$extra array Extra parameters that you can manually pass to the Shell to be dispatched. Built-in extra parameter is : - `requested` : if used, will prevent the Shell welcome message to be displayed
return boolean
    protected function _dispatch($extra = [])
    {
        $shell = $this->shiftArgs();
        if (!$shell) {
            $this->help();
            return false;
        }
        if (in_array($shell, ['help', '--help', '-h'])) {
            $this->help();
            return true;
        }
        if (in_array($shell, ['version', '--version'])) {
            $this->version();
            return true;
        }
        $Shell = $this->findShell($shell);
        $Shell->initialize();
        return $Shell->runCommand($this->args, true, $extra);
    }