Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TokenParserInterface.php

interface TokenParserInterface

Interface implemented by token parsers.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

  • interface \Twig\TokenParser\TokenParserInterface

Expanded class hierarchy of TokenParserInterface

All classes that implement TokenParserInterface

5 files declare their use of TokenParserInterface
Environment.php in vendor/twig/twig/src/Environment.php
ExtensionInterface.php in vendor/twig/twig/src/Extension/ExtensionInterface.php
ExtensionSet.php in vendor/twig/twig/src/ExtensionSet.php
Parser.php in vendor/twig/twig/src/Parser.php
StagingExtension.php in vendor/twig/twig/src/Extension/StagingExtension.php

File

vendor/twig/twig/src/TokenParser/TokenParserInterface.php, line 24

Namespace

Twig\TokenParser
View source
interface TokenParserInterface {
    
    /**
     * Sets the parser associated with this token parser.
     */
    public function setParser(Parser $parser) : void;
    
    /**
     * Parses a token and returns a node.
     *
     * @return Node
     *
     * @throws SyntaxError
     */
    public function parse(Token $token);
    
    /**
     * Gets the tag name associated with this token parser.
     *
     * @return string
     */
    public function getTag();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
TokenParserInterface::getTag public function Gets the tag name associated with this token parser. 20
TokenParserInterface::parse public function Parses a token and returns a node. 20
TokenParserInterface::setParser public function Sets the parser associated with this token parser. 1
RSS feed
Powered by Drupal