ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_NodeVisitorInterface Interface Reference

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

+ Inheritance diagram for Twig_NodeVisitorInterface:
+ Collaboration diagram for Twig_NodeVisitorInterface:

Public Member Functions

 enterNode (Twig_NodeInterface $node, Twig_Environment $env)
 Called before child nodes are visited. More...
 
 leaveNode (Twig_NodeInterface $node, Twig_Environment $env)
 Called after child nodes are visited. More...
 
 getPriority ()
 Returns the priority for this visitor. More...
 

Detailed Description

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

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file NodeVisitorInterface.php.

Member Function Documentation

◆ enterNode()

Twig_NodeVisitorInterface::enterNode ( Twig_NodeInterface  $node,
Twig_Environment  $env 
)

Called before child nodes are visited.

Returns
Twig_NodeInterface The modified node

Implemented in CExtDisablingNodeVisitor, Twig_Tests_EnvironmentTest_NodeVisitor, and Twig_BaseNodeVisitor.

Referenced by Twig_NodeTraverser\traverseForVisitor().

+ Here is the caller graph for this function:

◆ getPriority()

Twig_NodeVisitorInterface::getPriority ( )

Returns the priority for this visitor.

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

Returns
int The priority level

Implemented in CExtDisablingNodeVisitor, Twig_Tests_EnvironmentTest_NodeVisitor, Twig_NodeVisitor_Optimizer, Twig_NodeVisitor_Escaper, Twig_NodeVisitor_SafeAnalysis, Twig_NodeVisitor_Sandbox, and Twig_Profiler_NodeVisitor_Profiler.

Referenced by Twig_NodeTraverser\addVisitor().

+ Here is the caller graph for this function:

◆ leaveNode()

Twig_NodeVisitorInterface::leaveNode ( Twig_NodeInterface  $node,
Twig_Environment  $env 
)

Called after child nodes are visited.

Returns
Twig_NodeInterface|false The modified node or false if the node must be removed

Implemented in CExtDisablingNodeVisitor, Twig_Tests_EnvironmentTest_NodeVisitor, and Twig_BaseNodeVisitor.

Referenced by Twig_NodeTraverser\traverseForVisitor().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: