ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 setParser (Twig_Parser $parser)
 
 parse (Twig_Token $token)
 
 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.

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

References $end, and Twig_Extensions_Grammar\$name.

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.

40 {
41 return $token->test($this->end);
42 }

References PHPMailer\PHPMailer\$token.

◆ parse()

Twig_Extensions_Grammar_Body::parse ( Twig_Token  $token)

Implements Twig_Extensions_GrammarInterface.

Definition at line 31 of file Body.php.

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

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

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: