eZXMLInputParser::wordMatchSupport PHP Method

wordMatchSupport() protected method

*! Returns modified attributes parameter
protected wordMatchSupport ( $newTagName, $attributes, $attributeString )
    protected function wordMatchSupport($newTagName, $attributes, $attributeString)
    {
        $ini = eZINI::instance('wordmatch.ini');
        if ($ini->hasVariable($newTagName, 'MatchString')) {
            $matchArray = $ini->variable($newTagName, 'MatchString');
            if ($matchArray) {
                foreach (array_keys($matchArray) as $key) {
                    $matchString = $matchArray[$key];
                    if (preg_match("/{$matchString}/i", $attributeString)) {
                        $attributes['class'] = $key;
                        unset($attributes['style']);
                    }
                }
            }
        }
        return $attributes;
    }