public function Twig_NodeTraverser::traverse in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/NodeTraverser.php \Twig_NodeTraverser::traverse()
Traverses a node and calls the registered visitors.
Parameters
Twig_NodeInterface $node A Twig_NodeInterface instance:
Return value
File
- vendor/
twig/ twig/ lib/ Twig/ NodeTraverser.php, line 59
Class
- Twig_NodeTraverser
- Twig_NodeTraverser is a node traverser.
Code
public function traverse(Twig_NodeInterface $node) {
ksort($this->visitors);
foreach ($this->visitors as $visitors) {
foreach ($visitors as $visitor) {
$node = $this
->traverseForVisitor($visitor, $node);
}
}
return $node;
}