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

Public Member Functions

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

Protected Attributes

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

Detailed Description

Deprecated:
since version 1.5

Definition at line 15 of file Body.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Extensions_Grammar_Body::__construct (   $name,
  $end = null 
)

Definition at line 19 of file Body.php.

References $end, and Twig_Extensions_Grammar\$name.

20  {
21  parent::__construct($name);
22 
23  $this->end = null === $end ? 'end'.$name : $end;
24  }

Member Function Documentation

◆ __toString()

Twig_Extensions_Grammar_Body::__toString ( )

Definition at line 26 of file Body.php.

27  {
28  return sprintf('<%s:body>', $this->name);
29  }

◆ decideBlockEnd()

Twig_Extensions_Grammar_Body::decideBlockEnd ( Twig_Token  $token)

Definition at line 39 of file Body.php.

References Twig_Token\test().

40  {
41  return $token->test($this->end);
42  }
test($type, $values=null)
Tests the current token for a type and/or a value.
Definition: Token.php:70
+ Here is the call graph for this function:

◆ parse()

Twig_Extensions_Grammar_Body::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 31 of file Body.php.

References GuzzleHttp\Psr7\$stream, array, and Twig_Token\BLOCK_END_TYPE.

32  {
33  $stream = $this->parser->getStream();
35 
36  return $this->parser->subparse(array($this, 'decideBlockEnd'), true);
37  }
$stream
PHP stream implementation.
Create styles array
The data for the language used.
const BLOCK_END_TYPE
Definition: Token.php:30

Field Documentation

◆ $end

Twig_Extensions_Grammar_Body::$end
protected

Definition at line 17 of file Body.php.

Referenced by __construct().


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