think\console\Command::addOption PHP Method

addOption() public method

添加选项
public addOption ( string $name, string $shortcut = null, integer $mode = null, string $description = '', mixed $default = null ) : Command
$name string 选项名称
$shortcut string 别名
$mode integer 类型
$description string 描述
$default mixed 默认值
return Command
    public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
    {
        $this->definition->addOption(new Option($name, $shortcut, $mode, $description, $default));
        return $this;
    }