You are here

public function Twig_TokenParserBroker::addTokenParser in Zircon Profile 8

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

Adds a TokenParser.

Parameters

Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance:

File

vendor/twig/twig/lib/Twig/TokenParserBroker.php, line 58

Class

Twig_TokenParserBroker
Default implementation of a token parser broker.

Code

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