public function Twig_NodeTraverser::__construct in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 vendor/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/ 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);
}
}