Commando\Command::_option PHP Method

_option() private method

private _option ( Option | null $option, string | integer $name = null ) : Option
$option Option | null
$name string | integer
return Option
    private function _option($option, $name = null)
    {
        // Is this a previously declared option?
        if (isset($name) && !empty($this->options[$name])) {
            $this->current_option = $this->getOption($name);
        } else {
            if (!isset($name)) {
                $name = $this->nameless_option_counter++;
            }
            $this->current_option = $this->options[$name] = new Option($name);
        }
        return $this->current_option;
    }