protected function _addRulesModeGnu($rules)
    {
        $ruleArray = array();

        /**
         * Options may be single alphanumeric characters.
         * Options may have a ':' which indicates a required string parameter.
         * No long options or option aliases are supported in GNU style.
         */
        preg_match_all('/([a-zA-Z0-9]:?)/', $rules, $ruleArray);
        foreach ($ruleArray[1] as $rule) {
            $r = array();
            $flag = substr($rule, 0, 1);
            if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) {
                $flag = strtolower($flag);
            }
            $r['alias'][] = $flag;
            if (substr($rule, 1, 1) == ':') {
                $r['param'] = 'required';
                $r['paramType'] = 'string';
            } else {
                $r['param'] = 'none';
            }
            $this->_rules[$flag] = $r;
            $this->_ruleMap[$flag] = $flag;
        }
    }
protected function _addRulesModeGnu($rules)
    {
        $ruleArray = array();

        /**
         * Options may be single alphanumeric characters.
         * Options may have a ':' which indicates a required string parameter.
         * No long options or option aliases are supported in GNU style.
         */
        preg_match_all('/([a-zA-Z0-9]:?)/', $rules, $ruleArray);
        foreach ($ruleArray[1] as $rule) {
            $r = array();
            $flag = substr($rule, 0, 1);
            if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) {
                $flag = strtolower($flag);
            }
            $r['alias'][] = $flag;
            if (substr($rule, 1, 1) == ':') {
                $r['param'] = 'required';
                $r['paramType'] = 'string';
            } else {
                $r['param'] = 'none';
            }
            $this->_rules[$flag] = $r;
            $this->_ruleMap[$flag] = $flag;
        }
    }
protected function _addRulesModeGnu ( $ rules ) { $ ruleArray = array ( ) ; /**
         * Options may be single alphanumeric characters.
         * Options may have a ':' which indicates a required string parameter.
         * No long options or option aliases are supported in GNU style.
         */ preg_match_all ( '/([a-zA-Z0-9]:?)/' , $ rules , $ ruleArray ) ; foreach ( $ ruleArray [ 1 ] as $ rule ) { $ r = array ( ) ; $ flag = substr ( $ rule , 0 , 1 ) ; if ( $ this -> _getoptConfig [ self :: CONFIG_IGNORECASE ] ) { $ flag = strtolower ( $ flag ) ; } $ r [ 'alias' ] [ ] = $ flag ; if ( substr ( $ rule , 1 , 1 ) == ':' ) { $ r [ 'param' ] = 'required' ; $ r [ 'paramType' ] = 'string' ; } else { $ r [ 'param' ] = 'none' ; } $ this -> _rules [ $ flag ] = $ r ; $ this -> _ruleMap [ $ flag ] = $ flag ; } }
Define legal options using the gnu-style format.

@param  string $rules
@return void
Define legal options using the gnu - style format .