4 * This file is part of Twig.
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
13 * Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.
15 * @author Fabien Potencier <fabien@symfony.com>
17 interface Twig_NodeVisitorInterface
20 * Called before child nodes are visited.
22 * @return Twig_NodeInterface The modified node
24 public function enterNode(Twig_NodeInterface $node, Twig_Environment $env);
27 * Called after child nodes are visited.
29 * @return Twig_NodeInterface|false The modified node or false if the node must be removed
31 public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env);
34 * Returns the priority for this visitor.
36 * Priority should be between -10 and 10 (0 is the default).
38 * @return int The priority level
40 public function getPriority();