Twig_TokenParserBrokerInterface

Extends

Interface implemented by token parser brokers.

Token parser brokers allows to implement custom logic in the process of resolving a token parser for a given tag name.

author

Arnaud Le Blanc arnaud.lb@gmail.com

deprecated

since 1.12 (to be removed in 2.0)

package

Default

Methods

Gets the Twig_ParserInterface.

getParser(): \Twig_ParserInterface|null

Response

\Twig_ParserInterface|null

A Twig_ParserInterface instance or null

Gets a TokenParser suitable for a tag.

getTokenParser(string $tag): \Twig\TokenParser\TokenParserInterface|null

Arguments

$tag

string

A tag name

Response

\Twig\TokenParser\TokenParserInterface|null

A Twig_TokenParserInterface or null if no suitable TokenParser was found

Calls Twig\TokenParser\TokenParserInterface::setParser on all parsers the implementation knows of.

setParser(\Twig_ParserInterface $parser)

Arguments