#### Console
~~~
Console::init($run = true);
Console::call($command, array $parameters = [], $driver = 'buffer');
$console = new think\Console();
// 執行當前的指令
$console->run();
// 執行指令
$console->doRun(Input $input, Output $output);
// 設置輸入參數定義
$console->setDefinition(InputDefinition $definition);
// 獲取輸入參數定義
$console->getDefinition();
// Gets the help message.
$console->getHelp();
// 是否捕獲異常
$console->setCatchExceptions($boolean);
// 是否自動退出
$console->setAutoExit($boolean);
// 獲取名稱
$console->getName();
// 設置名稱
$console->setName($name);
// 獲取版本
$console->getVersion();
// 設置版本
$console->setVersion($version);
// 獲取完整的版本號
$console->getLongVersion();
// 注冊一個指令
$console->register($name);
// 添加指令
$console->addCommands(array $commands);
// 添加一個指令
$console->add(Command $command);
// 獲取指令
$console->get($name);
// 某個指令是設置默認命令否存在
$console->has($name);
// 獲取所有的命名空間
$console->getNamespaces();
// 查找注冊命名空間中的名稱或縮寫。
$console->findNamespace($namespace);
// 查找指令
$console->find($name);
// 獲取所有的指令
$console->all($namespace = null);
// 獲取可能的指令名
Console::getAbbreviations($names);
// 配置基于用戶的參數和選項的輸入和輸出實例。
$this->configureIO(Input $input, Output $output);
// 執行指令
$this->doRunCommand(Command $command, Input $input, Output $output);
// 獲取指令的基礎名稱
$this->getCommandName(Input $input);
// 獲取默認輸入定義
$this->getDefaultInputDefinition();
// 設置默認命令
$this->getDefaultCommands();
Console::addDefaultCommands(array $classnames);
// 獲取可能的建議
$this->getAbbreviationSuggestions($abbrevs);
// 返回命名空間部分
$console->extractNamespace($name, $limit = null);
// 查找可替代的建議
$this->findAlternatives($name, $collection);
// 設置默認的指令
$console->setDefaultCommand($commandName);
// 返回所有的命名空間
$this->extractAllNamespaces($name);復制代碼
~~~