public static function filterTag(Tag $tag, Parser $parser, array $tagsConfig, array $openTags)
	{
		$tagName   = $tag->getName();
		$tagConfig = $tagsConfig[$tagName];

		// Record the tag being processed into the logger it can be added to the context of
		// messages logged during the execution
		$logger = $parser->getLogger();
		$logger->setTag($tag);

		// Prepare the variables that are accessible to filters
		$vars = [
			'logger'         => $logger,
			'openTags'       => $openTags,
			'parser'         => $parser,
			'registeredVars' => $parser->registeredVars,
			'tag'            => $tag,
			'tagConfig'      => $tagConfig,
			'text'           => $parser->getText()
		];
		foreach ($tagConfig['filterChain'] as $filter)
		{
			if ($tag->isInvalid())
			{
				break;
			}
			self::executeFilter($filter, $vars);
		}

		// Remove the tag from the logger
		$logger->unsetTag();
	}
public static function filterTag(Tag $tag, Parser $parser, array $tagsConfig, array $openTags)
	{
		$tagName   = $tag->getName();
		$tagConfig = $tagsConfig[$tagName];

		// Record the tag being processed into the logger it can be added to the context of
		// messages logged during the execution
		$logger = $parser->getLogger();
		$logger->setTag($tag);

		// Prepare the variables that are accessible to filters
		$vars = [
			'logger'         => $logger,
			'openTags'       => $openTags,
			'parser'         => $parser,
			'registeredVars' => $parser->registeredVars,
			'tag'            => $tag,
			'tagConfig'      => $tagConfig,
			'text'           => $parser->getText()
		];
		foreach ($tagConfig['filterChain'] as $filter)
		{
			if ($tag->isInvalid())
			{
				break;
			}
			self::executeFilter($filter, $vars);
		}

		// Remove the tag from the logger
		$logger->unsetTag();
	}
public static function filterTag ( Tag $ tag , Parser $ parser , array $ tagsConfig , array $ openTags ) { $ tagName = $ tag -> getName ( ) ; $ tagConfig = $ tagsConfig [ $ tagName ] ; // Record the tag being processed into the logger it can be added to the context of // messages logged during the execution $ logger = $ parser -> getLogger ( ) ; $ logger -> setTag ( $ tag ) ; // Prepare the variables that are accessible to filters $ vars = [ 'logger' => $ logger , 'openTags' => $ openTags , 'parser' => $ parser , 'registeredVars' => $ parser -> registeredVars , 'tag' => $ tag , 'tagConfig' => $ tagConfig , 'text' => $ parser -> getText ( ) ] ; foreach ( $ tagConfig [ 'filterChain' ] as $ filter ) { if ( $ tag -> isInvalid ( ) ) { break ; } self :: executeFilter ( $ filter , $ vars ) ; } // Remove the tag from the logger $ logger -> unsetTag ( ) ; }
Execute a tag's filterChain

@private

@param  Tag    $tag        Tag to filter
@param  Parser $parser     Parser
@param  array  $tagsConfig Tags' config
@param  Tag[]  $openTags   List of open tags
@return void
Execute a tag s filterChain