ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Optimizer.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
16 {
17  protected $optimizers;
18 
19  public function __construct($optimizers = -1)
20  {
21  $this->optimizers = $optimizers;
22  }
23 
24  public function getNodeVisitors()
25  {
26  return array(new Twig_NodeVisitor_Optimizer($this->optimizers));
27  }
28 
29  public function getName()
30  {
31  return 'optimizer';
32  }
33 }
34 
35 class_alias('Twig_Extension_Optimizer', 'Twig\Extension\OptimizerExtension', false);
Twig_NodeVisitor_Optimizer tries to optimizes the AST.
Definition: Optimizer.php:24
__construct($optimizers=-1)
Definition: Optimizer.php:19
getNodeVisitors()
Returns the node visitor instances to add to the existing list.
Definition: Optimizer.php:24
getName()
Returns the name of the extension.
Definition: Optimizer.php:29