Default implementation of a token parser broker.
author | Arnaud Le Blanc arnaud.lb@gmail.com |
---|---|
deprecated | since 1.12 (to be removed in 2.0) |
package | Default |
__construct(array|\Traversable $parsers = array(),array|\Traversable $brokers = array(),boolean $triggerDeprecationError = true)
array|\Traversable
A \Traversable of Twig_TokenParserInterface instances
array|\Traversable
A \Traversable of Twig_TokenParserBrokerInterface instances
boolean
addTokenParser(\Twig\TokenParser\TokenParserInterface $parser)
addTokenParserBroker(self $broker)
self
getParser(): \Twig_ParserInterface|null
getParsers()
getTokenParser(string $tag): \Twig\TokenParser\TokenParserInterface|null
First looks in parsers, then in brokers.
string
A tag name
\Twig\TokenParser\TokenParserInterface|null
A Twig_TokenParserInterface or null if no suitable TokenParser was found
removeTokenParser(\Twig\TokenParser\TokenParserInterface $parser)
removeTokenParserBroker(self $broker)
self
setParser(\Twig_ParserInterface $parser)
parser :
parsers :
brokers :