Twig API
Interface

Twig_TokenParserInterface

interface Twig_TokenParserInterface

Interface implemented by token parsers.

Methods

setParser(Twig_Parser $parser)

Sets the parser associated with this token parser

Twig_NodeInterface 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 24
public setParser(Twig_Parser $parser)

Sets the parser associated with this token parser

Parameters

Twig_Parser $parser A Twig_Parser instance

at line 33
public Twig_NodeInterface parse(Twig_Token $token)

Parses a token and returns a node.

Parameters

Twig_Token $token A Twig_Token instance

Return Value

Twig_NodeInterface A Twig_NodeInterface instance

at line 40
public string getTag()

Gets the tag name associated with this token parser.

Return Value

string The tag name