think\Console::doRun PHP Method

doRun() public method

执行指令
public doRun ( Input $input, Output $output ) : integer
$input think\console\Input
$output think\console\Output
return integer
    public function doRun(Input $input, Output $output)
    {
        if (true === $input->hasParameterOption(['--version', '-V'])) {
            $output->writeln($this->getLongVersion());
            return 0;
        }
        $name = $this->getCommandName($input);
        if (true === $input->hasParameterOption(['--help', '-h'])) {
            if (!$name) {
                $name = 'help';
                $input = new Input(['help']);
            } else {
                $this->wantHelps = true;
            }
        }
        if (!$name) {
            $name = $this->defaultCommand;
            $input = new Input([$this->defaultCommand]);
        }
        $command = $this->find($name);
        $exitCode = $this->doRunCommand($command, $input, $output);
        return $exitCode;
    }