interface Twig_NodeVisitorInterface

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

Methods

enterNode(Twig_Node $node, Twig_Environment $env)

Called before child nodes are visited.

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

Called after child nodes are visited.

int
getPriority()

Returns the priority for this visitor.

Details

at line 24
Twig_Node enterNode(Twig_Node $node, Twig_Environment $env)

Called before child nodes are visited.

Parameters

Twig_Node $node
Twig_Environment $env

Return Value

Twig_Node The modified node

at line 31
Twig_Node|false leaveNode(Twig_Node $node, Twig_Environment $env)

Called after child nodes are visited.

Parameters

Twig_Node $node
Twig_Environment $env

Return Value

Twig_Node|false The modified node or false if the node must be removed

at line 40
int getPriority()

Returns the priority for this visitor.

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

Return Value

int The priority level