ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_TokenParser_Do Class Reference

Evaluates an expression, discarding the returned value. More...

+ Inheritance diagram for Twig_TokenParser_Do:
+ Collaboration diagram for Twig_TokenParser_Do:

Public Member Functions

 parse (Twig_Token $token)
 Parses a token and returns a node. More...
 
 getTag ()
 Gets the tag name associated with this token parser. More...
 
- Public Member Functions inherited from Twig_TokenParser
 setParser (Twig_Parser $parser)
 Sets the parser associated with this token parser. More...
 
 setParser (Twig_Parser $parser)
 Sets the parser associated with this token parser. More...
 
 parse (Twig_Token $token)
 Parses a token and returns a node. More...
 
 getTag ()
 Gets the tag name associated with this token parser. More...
 

Additional Inherited Members

- Protected Attributes inherited from Twig_TokenParser
 $parser
 

Detailed Description

Evaluates an expression, discarding the returned value.

@final

Definition at line 17 of file Do.php.

Member Function Documentation

◆ getTag()

Twig_TokenParser_Do::getTag ( )

Gets the tag name associated with this token parser.

Returns
string The tag name

Implements Twig_TokenParserInterface.

Definition at line 28 of file Do.php.

29 {
30 return 'do';
31 }

◆ parse()

Twig_TokenParser_Do::parse ( Twig_Token  $token)

Parses a token and returns a node.

Returns
Twig_NodeInterface
Exceptions
Twig_Error_Syntax

Implements Twig_TokenParserInterface.

Definition at line 19 of file Do.php.

20 {
21 $expr = $this->parser->getExpressionParser()->parseExpression();
22
23 $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
24
25 return new Twig_Node_Do($expr, $token->getLine(), $this->getTag());
26 }
Represents a do node.
Definition: Do.php:18
const BLOCK_END_TYPE
Definition: Token.php:30
getLine()
Definition: Token.php:87

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

+ Here is the call graph for this function:

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