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

Public Member Functions

 __construct (Twig_NodeInterface $left, Twig_NodeInterface $right, $lineno)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
 operator (Twig_Compiler $compiler)
 
- 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 ()
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
 getLine ()
 
 getNodeTag ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 12 of file Binary.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Node_Expression_Binary::__construct ( Twig_NodeInterface  $left,
Twig_NodeInterface  $right,
  $lineno 
)

Definition at line 14 of file Binary.php.

15 {
16 parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno);
17 }
$lineno
Definition: Node.php:22

References Twig_Node\$lineno.

Member Function Documentation

◆ compile()

Twig_Node_Expression_Binary::compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Reimplemented from Twig_Node.

Reimplemented in Twig_Node_Expression_Binary_EndsWith, Twig_Node_Expression_Binary_FloorDiv, Twig_Node_Expression_Binary_In, Twig_Node_Expression_Binary_Matches, Twig_Node_Expression_Binary_NotIn, Twig_Node_Expression_Binary_Power, Twig_Node_Expression_Binary_Range, and Twig_Node_Expression_Binary_StartsWith.

Definition at line 19 of file Binary.php.

20 {
21 $compiler
22 ->raw('(')
23 ->subcompile($this->getNode('left'))
24 ->raw(' ')
25 ;
26 $this->operator($compiler);
27 $compiler
28 ->raw(' ')
29 ->subcompile($this->getNode('right'))
30 ->raw(')')
31 ;
32 }
raw($string)
Adds a raw string to the compiled code.
Definition: Compiler.php:112
operator(Twig_Compiler $compiler)
getNode($name)
Definition: Node.php:186

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

+ Here is the call graph for this function:

◆ operator()


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