ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Profiler_Node_LeaveProfile Class Reference

Represents a profile leave node. More...

+ Inheritance diagram for Twig_Profiler_Node_LeaveProfile:
+ Collaboration diagram for Twig_Profiler_Node_LeaveProfile:

Public Member Functions

 __construct ($varName)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
- Public Member Functions inherited from Twig_Node
 __construct (array $nodes=array(), array $attributes=array(), $lineno=0, $tag=null)
 Constructor. More...
 
 __toString ()
 
 toXml ($asDom=false)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
 getTemplateLine ()
 
 getLine ()
 
 getNodeTag ()
 
 hasAttribute ($name)
 
 getAttribute ($name)
 
 setAttribute ($name, $value)
 
 removeAttribute ($name)
 
 hasNode ($name)
 
 getNode ($name)
 
 setNode ($name, $node=null)
 
 removeNode ($name)
 
 count ()
 
 getIterator ()
 
 setTemplateName ($name)
 
 getTemplateName ()
 
 setFilename ($name)
 
 getFilename ()
 

Additional Inherited Members

- Protected Attributes inherited from Twig_Node
 $nodes
 
 $attributes
 
 $lineno
 
 $tag
 

Detailed Description

Represents a profile leave node.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file LeaveProfile.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Profiler_Node_LeaveProfile::__construct (   $varName)

Definition at line 19 of file LeaveProfile.php.

References array.

20  {
21  parent::__construct(array(), array('var_name' => $varName));
22  }
Create styles array
The data for the language used.

Member Function Documentation

◆ compile()

Twig_Profiler_Node_LeaveProfile::compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Implements Twig_NodeInterface.

Definition at line 24 of file LeaveProfile.php.

References Twig_Node\getAttribute(), and Twig_Compiler\write().

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  }
getAttribute($name)
Definition: Node.php:152
write()
Writes a string to the compiled code by adding indentation.
Definition: Compiler.php:124
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: