ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Extensions_Grammar_Boolean Class Reference
+ Inheritance diagram for Twig_Extensions_Grammar_Boolean:
+ Collaboration diagram for Twig_Extensions_Grammar_Boolean:

Public Member Functions

 __toString ()
 
 parse (Twig_Token $token)
 
- Public Member Functions inherited from Twig_Extensions_Grammar
 __construct ($name)
 
 setParser (Twig_Parser $parser)
 
 getName ()
 

Additional Inherited Members

- Protected Attributes inherited from Twig_Extensions_Grammar
 $name
 
 $parser
 

Detailed Description

Deprecated:
since version 1.5

Definition at line 15 of file Boolean.php.

Member Function Documentation

◆ __toString()

Twig_Extensions_Grammar_Boolean::__toString ( )

Definition at line 17 of file Boolean.php.

18  {
19  return sprintf('<%s:boolean>', $this->name);
20  }

◆ parse()

Twig_Extensions_Grammar_Boolean::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 22 of file Boolean.php.

References array, Twig_Token\getLine(), Twig_Token\getValue(), and Twig_Token\NAME_TYPE.

23  {
24  $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, array('true', 'false'));
25 
26  return new Twig_Node_Expression_Constant('true' === $token->getValue() ? true : false, $token->getLine());
27  }
getValue()
Definition: Token.php:103
Create styles array
The data for the language used.
getLine()
Definition: Token.php:87
const NAME_TYPE
Definition: Token.php:32
+ Here is the call graph for this function:

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