You are here

public function Twig_TokenParserBroker::removeTokenParser in Translation template extractor 7.3

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

Removes a TokenParser.

Parameters

Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance:

File

vendor/Twig/TokenParserBroker.php, line 68

Class

Twig_TokenParserBroker
Default implementation of a token parser broker.

Code

public function removeTokenParser(Twig_TokenParserInterface $parser) {
  $name = $parser
    ->getTag();
  if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) {
    unset($this->parsers[$name]);
  }
}