interface Twig_TokenParserInterface

Interface implemented by token parsers.

Methods

setParser(Twig_Parser $parser)

Sets the parser associated with this token parser.

parse(Twig_Token $token)

Parses a token and returns a node.

string
getTag()

Gets the tag name associated with this token parser.

Details

at line 22
setParser(Twig_Parser $parser)

Sets the parser associated with this token parser.

Parameters

Twig_Parser $parser

at line 31
Twig_Node parse(Twig_Token $token)

Parses a token and returns a node.

Parameters

Twig_Token $token

Return Value

Twig_Node A Twig_Node instance

Exceptions

Twig_Error_Syntax

at line 38
string getTag()

Gets the tag name associated with this token parser.

Return Value

string The tag name