final public function Twig_BaseNodeVisitor::enterNode in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/BaseNodeVisitor.php \Twig_BaseNodeVisitor::enterNode()
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/ twig/ lib/ 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);
}