You are here

public function Twig_NodeTraverser::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/Twig/NodeTraverser.php \Twig_NodeTraverser::__construct()

Constructor.

Parameters

Twig_Environment $env A Twig_Environment instance:

Twig_NodeVisitorInterface[] $visitors An array of Twig_NodeVisitorInterface instances:

File

vendor/twig/twig/lib/Twig/NodeTraverser.php, line 30

Class

Twig_NodeTraverser
Twig_NodeTraverser is a node traverser.

Code

public function __construct(Twig_Environment $env, array $visitors = array()) {
  $this->env = $env;
  foreach ($visitors as $visitor) {
    $this
      ->addVisitor($visitor);
  }
}