public function Twig_TokenParserBroker::setParser in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/TokenParserBroker.php \Twig_TokenParserBroker::setParser()
Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.
Parameters
Twig_ParserInterface $parser A Twig_ParserInterface interface:
Overrides Twig_TokenParserBrokerInterface::setParser
File
- vendor/
Twig/ TokenParserBroker.php, line 126
Class
- Twig_TokenParserBroker
- Default implementation of a token parser broker.
Code
public function setParser(Twig_ParserInterface $parser) {
$this->parser = $parser;
foreach ($this->parsers as $tokenParser) {
$tokenParser
->setParser($parser);
}
foreach ($this->brokers as $broker) {
$broker
->setParser($parser);
}
}