public function newSwitch($name, $group = null)
    {
        $arg = OptionItem::createSwitch($name);

        if ($this->obj_color->opt) {
            $arg->color($this->obj_color->opt);
        }

        if ($this->obj_color->bold) {
            $arg->bold();
        }

        self::add($arg, $group);

        return self::getOpt($name);
    }
public function newSwitch($name, $group = null)
    {
        $arg = OptionItem::createSwitch($name);

        if ($this->obj_color->opt) {
            $arg->color($this->obj_color->opt);
        }

        if ($this->obj_color->bold) {
            $arg->bold();
        }

        self::add($arg, $group);

        return self::getOpt($name);
    }
public function newSwitch ( $ name , $ group = null ) { $ arg = OptionItem :: createSwitch ( $ name ) ; if ( $ this -> obj_color -> opt ) { $ arg -> color ( $ this -> obj_color -> opt ) ; } if ( $ this -> obj_color -> bold ) { $ arg -> bold ( ) ; } self :: add ( $ arg , $ group ) ; return self :: getOpt ( $ name ) ; }
Adds a new option switch.

@param  string     $name  The string to identify and call this option.
@param  string     $group Optional group's name
@access public
@return OptionItem The newly created option, to chain methods.
Adds a new option switch .