[ Index ]

PHP Cross Reference of phpBB-3.3.11-deutsch

title

Body

[close]

/vendor/symfony/twig-bridge/TokenParser/ -> TransDefaultDomainTokenParser.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <fabien@symfony.com>
   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 Symfony\Bridge\Twig\TokenParser;
  13  
  14  use Symfony\Bridge\Twig\Node\TransDefaultDomainNode;
  15  use Twig\Token;
  16  use Twig\TokenParser\AbstractTokenParser;
  17  
  18  /**
  19   * Token Parser for the 'trans_default_domain' tag.
  20   *
  21   * @author Fabien Potencier <fabien@symfony.com>
  22   */
  23  class TransDefaultDomainTokenParser extends AbstractTokenParser
  24  {
  25      /**
  26       * {@inheritdoc}
  27       */
  28      public function parse(Token $token)
  29      {
  30          $expr = $this->parser->getExpressionParser()->parseExpression();
  31  
  32          $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
  33  
  34          return new TransDefaultDomainNode($expr, $token->getLine(), $this->getTag());
  35      }
  36  
  37      /**
  38       * {@inheritdoc}
  39       */
  40      public function getTag()
  41      {
  42          return 'trans_default_domain';
  43      }
  44  }


Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1