protected function simpleOpt($opt, $disc = '')
    {
        $type = $this->getOptionType($opt);
        $key = $this->stripOpt($opt);
        //
        if ($type == self::REQUIRED) {
            $key = substr($key, 0, -1);
            $this->addOption($key, null, InputOption::VALUE_REQUIRED, $disc);
            $this->addOptionInput($key, InputOption::VALUE_REQUIRED, $disc);
        } elseif ($type == self::OPTIONAL) {
            $this->addOption($key, null, InputOption::VALUE_NONE, $disc);
            $this->addOptionInput($key, InputOption::VALUE_NONE, $disc);
        } elseif ($type == self::VALUE) {
            $value = $this->getOptionalValue($key);
            //
            $key = $this->getOptionalKeyValue($key);
            //
            $this->addOption($key, null, InputOption::VALUE_OPTIONAL, $disc, $value);
            $this->addOptionInput($key, InputOption::VALUE_OPTIONAL, $disc, $value);
        }
    }
protected function simpleOpt($opt, $disc = '')
    {
        $type = $this->getOptionType($opt);
        $key = $this->stripOpt($opt);
        //
        if ($type == self::REQUIRED) {
            $key = substr($key, 0, -1);
            $this->addOption($key, null, InputOption::VALUE_REQUIRED, $disc);
            $this->addOptionInput($key, InputOption::VALUE_REQUIRED, $disc);
        } elseif ($type == self::OPTIONAL) {
            $this->addOption($key, null, InputOption::VALUE_NONE, $disc);
            $this->addOptionInput($key, InputOption::VALUE_NONE, $disc);
        } elseif ($type == self::VALUE) {
            $value = $this->getOptionalValue($key);
            //
            $key = $this->getOptionalKeyValue($key);
            //
            $this->addOption($key, null, InputOption::VALUE_OPTIONAL, $disc, $value);
            $this->addOptionInput($key, InputOption::VALUE_OPTIONAL, $disc, $value);
        }
    }
protected function simpleOpt ( $ opt , $ disc = '' ) { $ type = $ this -> getOptionType ( $ opt ) ; $ key = $ this -> stripOpt ( $ opt ) ; // if ( $ type == self :: REQUIRED ) { $ key = substr ( $ key , 0 , - 1 ) ; $ this -> addOption ( $ key , null , InputOption :: VALUE_REQUIRED , $ disc ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_REQUIRED , $ disc ) ; } elseif ( $ type == self :: OPTIONAL ) { $ this -> addOption ( $ key , null , InputOption :: VALUE_NONE , $ disc ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_NONE , $ disc ) ; } elseif ( $ type == self :: VALUE ) { $ value = $ this -> getOptionalValue ( $ key ) ; // $ key = $ this -> getOptionalKeyValue ( $ key ) ; // $ this -> addOption ( $ key , null , InputOption :: VALUE_OPTIONAL , $ disc , $ value ) ; $ this -> addOptionInput ( $ key , InputOption :: VALUE_OPTIONAL , $ disc , $ value ) ; } }
set simple option with optional description.
set simple option with optional description .