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

Represents an extension call node. More...

+ Inheritance diagram for Twig_Node_Expression_ExtensionReference:
+ Collaboration diagram for Twig_Node_Expression_ExtensionReference:

Public Member Functions

 __construct ($name, $lineno, $tag=null)
 
 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 an extension call node.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Deprecated:
since 1.23 and will be removed in 2.0.

Definition at line 21 of file ExtensionReference.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Node_Expression_ExtensionReference::__construct (   $name,
  $lineno,
  $tag = null 
)

Definition at line 23 of file ExtensionReference.php.

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

24  {
25  parent::__construct(array(), array('name' => $name), $lineno, $tag);
26  }
$lineno
Definition: Node.php:22
Create styles array
The data for the language used.

Member Function Documentation

◆ compile()

Twig_Node_Expression_ExtensionReference::compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Implements Twig_NodeInterface.

Definition at line 28 of file ExtensionReference.php.

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

29  {
30  $compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name')));
31  }
raw($string)
Adds a raw string to the compiled code.
Definition: Compiler.php:112
getAttribute($name)
Definition: Node.php:152
+ Here is the call graph for this function:

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