src/Handler.php
public function addOption($name, Option $opt = null) {
        if (isset($this->configOpts[$name]) || isset($this->configArgs[$name])) {
            throw new ConfigException('option/argument already set: ' . $name);
        }

        if (is_null($opt)) {
            $opt = new Option();
        }

        $this->configOpts[$name] = $opt;
        return $opt;
    }
public function addOption($name, Option $opt = null) {
        if (isset($this->configOpts[$name]) || isset($this->configArgs[$name])) {
            throw new ConfigException('option/argument already set: ' . $name);
        }

        if (is_null($opt)) {
            $opt = new Option();
        }

        $this->configOpts[$name] = $opt;
        return $opt;
    }
public function addOption ( $ name , Option $ opt = null ) { if ( isset ( $ this -> configOpts [ $ name ] ) || isset ( $ this -> configArgs [ $ name ] ) ) { throw new ConfigException ( 'option/argument already set: ' . $ name ) ; } if ( is_null ( $ opt ) ) { $ opt = new Option ( ) ; } $ this -> configOpts [ $ name ] = $ opt ; return $ opt ; }
add a new option

@param string $name
@param Option $opt
@return Option
@throws ConfigException
add a new option