protected static function executeAttributePreprocessor(Tag $tag, $attrName, $regexp, $map)
	{
		$attrValue = $tag->getAttribute($attrName);
		$captures  = self::getNamedCaptures($attrValue, $regexp, $map);
		foreach ($captures as $k => $v)
		{
			// Attribute preprocessors cannot overwrite other attributes but they can
			// overwrite themselves
			if ($k === $attrName || !$tag->hasAttribute($k))
			{
				$tag->setAttribute($k, $v);
			}
		}
	}
protected static function executeAttributePreprocessor(Tag $tag, $attrName, $regexp, $map)
	{
		$attrValue = $tag->getAttribute($attrName);
		$captures  = self::getNamedCaptures($attrValue, $regexp, $map);
		foreach ($captures as $k => $v)
		{
			// Attribute preprocessors cannot overwrite other attributes but they can
			// overwrite themselves
			if ($k === $attrName || !$tag->hasAttribute($k))
			{
				$tag->setAttribute($k, $v);
			}
		}
	}
protected static function executeAttributePreprocessor ( Tag $ tag , $ attrName , $ regexp , $ map ) { $ attrValue = $ tag -> getAttribute ( $ attrName ) ; $ captures = self :: getNamedCaptures ( $ attrValue , $ regexp , $ map ) ; foreach ( $ captures as $ k => $ v ) { // Attribute preprocessors cannot overwrite other attributes but they can // overwrite themselves if ( $ k === $ attrName || ! $ tag -> hasAttribute ( $ k ) ) { $ tag -> setAttribute ( $ k , $ v ) ; } } }
Execute an attribute preprocessor

@param  Tag      $tag
@param  string   $attrName
@param  string   $regexp
@param  string[] $map
@return void
Execute an attribute preprocessor