\Twig_NodeVisitorInterface

Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.

Summary

Methods
Constants
enterNode()
leaveNode()
getPriority()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

enterNode()

enterNode(\Twig_Node  $node, \Twig_Environment  $env) : \Twig_Node

Called before child nodes are visited.

Parameters

\Twig_Node $node
\Twig_Environment $env

Returns

\Twig_Node

The modified node

leaveNode()

leaveNode(\Twig_Node  $node, \Twig_Environment  $env) : \Twig_Node|false

Called after child nodes are visited.

Parameters

\Twig_Node $node
\Twig_Environment $env

Returns

\Twig_Node|false —

The modified node or false if the node must be removed

getPriority()

getPriority() : integer

Returns the priority for this visitor.

Priority should be between -10 and 10 (0 is the default).

Returns

integer —

The priority level