[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/twig/twig/src/TokenParser/ -> DoTokenParser.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of Twig.
   5   *
   6   * (c) Fabien Potencier
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Twig\TokenParser;
  13  
  14  use Twig\Node\DoNode;
  15  use Twig\Token;
  16  
  17  /**
  18   * Evaluates an expression, discarding the returned value.
  19   *
  20   * @final
  21   */
  22  class DoTokenParser extends AbstractTokenParser
  23  {
  24      public function parse(Token $token)
  25      {
  26          $expr = $this->parser->getExpressionParser()->parseExpression();
  27  
  28          $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
  29  
  30          return new DoNode($expr, $token->getLine(), $this->getTag());
  31      }
  32  
  33      public function getTag()
  34      {
  35          return 'do';
  36      }
  37  }
  38  
  39  class_alias('Twig\TokenParser\DoTokenParser', 'Twig_TokenParser_Do');


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1