ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_Node_SetTemp Class Reference
+ Inheritance diagram for Twig_Node_SetTemp:
+ Collaboration diagram for Twig_Node_SetTemp:

Public Member Functions

 __construct ($name, $lineno)
 
 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

Definition at line 15 of file SetTemp.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Node_SetTemp::__construct (   $name,
  $lineno 
)

Definition at line 17 of file SetTemp.php.

References Twig_Node\$lineno, and Twig_Node\$name.

18  {
19  parent::__construct(array(), array('name' => $name), $lineno);
20  }
$lineno
Definition: Node.php:22

Member Function Documentation

◆ compile()

Twig_Node_SetTemp::compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Implements Twig_NodeInterface.

Definition at line 22 of file SetTemp.php.

References Twig_Node\$name, Twig_Compiler\addDebugInfo(), and Twig_Node\getAttribute().

23  {
24  $name = $this->getAttribute('name');
25  $compiler
26  ->addDebugInfo($this)
27  ->write('if (isset($context[')
28  ->string($name)
29  ->raw('])) { $_')
30  ->raw($name)
31  ->raw('_ = $context[')
32  ->repr($name)
33  ->raw(']; } else { $_')
34  ->raw($name)
35  ->raw("_ = null; }\n")
36  ;
37  }
getAttribute($name)
Definition: Node.php:152
addDebugInfo(Twig_NodeInterface $node)
Adds debugging information.
Definition: Compiler.php:212
+ Here is the call graph for this function:

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