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

Public Member Functions

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

Protected Attributes

 $type
 
- Protected Attributes inherited from Twig_Extensions_Grammar
 $name
 
 $parser
 

Detailed Description

Deprecated:
since version 1.5

Definition at line 15 of file Constant.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Extensions_Grammar_Constant::__construct (   $name,
  $type = null 
)

Definition at line 19 of file Constant.php.

References Twig_Extensions_Grammar\$name, $type, and Twig_Token\NAME_TYPE.

20  {
21  $this->name = $name;
22  $this->type = null === $type ? Twig_Token::NAME_TYPE : $type;
23  }
const NAME_TYPE
Definition: Token.php:32

Member Function Documentation

◆ __toString()

Twig_Extensions_Grammar_Constant::__toString ( )

Definition at line 25 of file Constant.php.

References Twig_Extensions_Grammar\$name.

26  {
27  return $this->name;
28  }

◆ getType()

Twig_Extensions_Grammar_Constant::getType ( )

Definition at line 37 of file Constant.php.

References $type.

38  {
39  return $this->type;
40  }

◆ parse()

Twig_Extensions_Grammar_Constant::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 30 of file Constant.php.

References Twig_Extensions_Grammar\$name.

31  {
32  $this->parser->getStream()->expect($this->type, $this->name);
33 
34  return $this->name;
35  }

Field Documentation

◆ $type

Twig_Extensions_Grammar_Constant::$type
protected

Definition at line 17 of file Constant.php.

Referenced by __construct(), and getType().


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