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

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 Number.php.

Member Function Documentation

◆ __toString()

Twig_Extensions_Grammar_Number::__toString ( )

Definition at line 17 of file Number.php.

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

◆ parse()

Twig_Extensions_Grammar_Number::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 22 of file Number.php.

References Twig_Token\getLine(), Twig_Token\getValue(), and Twig_Token\NUMBER_TYPE.

23  {
24  $this->parser->getStream()->expect(Twig_Token::NUMBER_TYPE);
25 
26  return new Twig_Node_Expression_Constant($token->getValue(), $token->getLine());
27  }
getValue()
Definition: Token.php:103
const NUMBER_TYPE
Definition: Token.php:33
getLine()
Definition: Token.php:87
+ Here is the call graph for this function:

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