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

Checks that a variable is null. More...

+ Inheritance diagram for Twig_Node_Expression_Test_Null:
+ Collaboration diagram for Twig_Node_Expression_Test_Null:

Public Member Functions

 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
- Public Member Functions inherited from Twig_Node_Expression_Test
 __construct (Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments=null, $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 Member Functions inherited from Twig_Node_Expression_Call
 compileCallable (Twig_Compiler $compiler)
 
 compileArguments (Twig_Compiler $compiler)
 
 getArguments ($callable, $arguments)
 
 normalizeName ($name)
 
- Protected Attributes inherited from Twig_Node
 $nodes
 
 $attributes
 
 $lineno
 
 $tag
 

Detailed Description

Checks that a variable is null.

 {{ var is none }}
Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 21 of file Null.php.

Member Function Documentation

◆ compile()

Twig_Node_Expression_Test_Null::compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Implements Twig_NodeInterface.

Definition at line 23 of file Null.php.

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

24  {
25  $compiler
26  ->raw('(null === ')
27  ->subcompile($this->getNode('node'))
28  ->raw(')')
29  ;
30  }
raw($string)
Adds a raw string to the compiled code.
Definition: Compiler.php:112
getNode($name)
Definition: Node.php:186
+ Here is the call graph for this function:

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