final public function Twig_BaseNodeVisitor::enterNode in Translation template extractor 7.3
Called before child nodes are visited.
Parameters
Twig_NodeInterface $node The node to visit:
Twig_Environment $env The Twig environment instance:
Return value
Twig_NodeInterface The modified node
Overrides Twig_NodeVisitorInterface::enterNode
File
- vendor/
Twig/ BaseNodeVisitor.php, line 22
Class
- Twig_BaseNodeVisitor
- Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.
Code
public final function enterNode(Twig_NodeInterface $node, Twig_Environment $env) {
if (!$node instanceof Twig_Node) {
throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
}
return $this
->doEnterNode($node, $env);
}