NodeVisitorInterface
in
Interface for node visitor classes.
Tags
Table of Contents
- enterNode() : Node
- Called before child nodes are visited.
- getPriority() : int
- Returns the priority for this visitor.
- leaveNode() : Node|null
- Called after child nodes are visited.
Methods
enterNode()
Called before child nodes are visited.
public
enterNode(Node $node, Environment $env) : Node
Parameters
- $node : Node
- $env : Environment
Return values
Node —The modified node
getPriority()
Returns the priority for this visitor.
public
getPriority() : int
Priority should be between -10 and 10 (0 is the default).
Return values
int —The priority level
leaveNode()
Called after child nodes are visited.
public
leaveNode(Node $node, Environment $env) : Node|null
Parameters
- $node : Node
- $env : Environment
Return values
Node|null —The modified node or null if the node must be removed