TokenParserInterface

Extends

Interface implemented by token parsers.

author

Fabien Potencier fabien@symfony.com

package

Default

Methods

Gets the tag name associated with this token parser.

getTag(): string

Response

string

The tag name

Parses a token and returns a node.

parse(\Twig\Token $token): \Twig_NodeInterface
Throws
\Twig\Error\SyntaxError

Arguments

$token

\Twig\Token

Response

\Twig_NodeInterface

Sets the parser associated with this token parser.

setParser(\Twig\Parser $parser)

Arguments

$parser

\Twig\Parser