NodeTraverser

A node traverser.

It visits all nodes and their children and calls the given visitor for each.

final
author

Fabien Potencier fabien@symfony.com

package

Default

Methods

__construct

__construct(\Twig\Environment $env,array<mixed,\Twig\NodeVisitor\NodeVisitorInterface> $visitors = array())

Arguments

$env

\Twig\Environment

addVisitor

addVisitor(\Twig\NodeVisitor\NodeVisitorInterface $visitor)

Traverses a node and calls the registered visitors.

traverse(\Twig_NodeInterface $node): \Twig_NodeInterface

Arguments

Response

\Twig_NodeInterface

traverseForVisitor

traverseForVisitor(\Twig\NodeVisitor\NodeVisitorInterface $visitor,\Twig_NodeInterface $node = null)

Properties

env

env :

Type(s)

visitors

visitors :

Type(s)