NodeVisitorInterface

Extends

Interface for node visitor classes.

author

Fabien Potencier fabien@symfony.com

package

Default

Methods

Called before child nodes are visited.

enterNode(\Twig_NodeInterface $node,\Twig\Environment $env): \Twig_NodeInterface

Arguments

$env

\Twig\Environment

Response

\Twig_NodeInterface

The modified node

Returns the priority for this visitor.

getPriority(): integer

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

Response

integer

The priority level

Called after child nodes are visited.

leaveNode(\Twig_NodeInterface $node,\Twig\Environment $env): \Twig_NodeInterface|false|null

Arguments

$env

\Twig\Environment

Response

\Twig_NodeInterface|false|null

The modified node or null if the node must be removed