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

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

Member Function Documentation

◆ __toString()

Twig_Extensions_Grammar_Switch::__toString ( )

Definition at line 17 of file Switch.php.

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

◆ parse()

Twig_Extensions_Grammar_Switch::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 22 of file Switch.php.

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

23  {
24  $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, $this->name);
25 
26  return new Twig_Node_Expression_Constant(true, $token->getLine());
27  }
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: