public function transformByGroup($string, $ruleGroup)
    {
        $rules = $this->getRules();

        foreach (array_keys($rules) as $ruleName) {
            if (strpos($ruleName, $ruleGroup) === false) {
                continue;
            }

            foreach ($rules[$ruleName] as $rule) {
                $string = preg_replace_callback(
                    $rule['regexp'],
                    $rule['callback'],
                    $string
                );
            }
        }

        return $string;
    }
public function transformByGroup($string, $ruleGroup)
    {
        $rules = $this->getRules();

        foreach (array_keys($rules) as $ruleName) {
            if (strpos($ruleName, $ruleGroup) === false) {
                continue;
            }

            foreach ($rules[$ruleName] as $rule) {
                $string = preg_replace_callback(
                    $rule['regexp'],
                    $rule['callback'],
                    $string
                );
            }
        }

        return $string;
    }
public function transformByGroup ( $ string , $ ruleGroup ) { $ rules = $ this -> getRules ( ) ; foreach ( array_keys ( $ rules ) as $ ruleName ) { if ( strpos ( $ ruleName , $ ruleGroup ) === false ) { continue ; } foreach ( $ rules [ $ ruleName ] as $ rule ) { $ string = preg_replace_callback ( $ rule [ 'regexp' ] , $ rule [ 'callback' ] , $ string ) ; } } return $ string ; }
Transform the given string by group.

Transform the given string using a rule group.

@param string $string
@param string $ruleGroup

@return string
Transform the given string by group .