You are here

public function Twig_TokenParserBroker::addTokenParser in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/TokenParserBroker.php \Twig_TokenParserBroker::addTokenParser()

Adds a TokenParser.

Parameters

Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance:

File

vendor/Twig/TokenParserBroker.php, line 52

Class

Twig_TokenParserBroker
Default implementation of a token parser broker.

Code

public function addTokenParser(Twig_TokenParserInterface $parser) {
  $this->parsers[$parser
    ->getTag()] = $parser;
}