ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LeaveProfile.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 
18 {
19  public function __construct($varName)
20  {
21  parent::__construct(array(), array('var_name' => $varName));
22  }
23 
24  public function compile(Twig_Compiler $compiler)
25  {
26  $compiler
27  ->write("\n")
28  ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
29  ;
30  }
31 }
32 
33 class_alias('Twig_Profiler_Node_LeaveProfile', 'Twig\Profiler\Node\LeaveProfileNode', false);
Represents a node in the AST.
Definition: Node.php:18
Represents a profile leave node.
getAttribute($name)
Definition: Node.php:152
Create styles array
The data for the language used.
compile(Twig_Compiler $compiler)
Compiles the node to PHP.
write()
Writes a string to the compiled code by adding indentation.
Definition: Compiler.php:124