\Twig_TokenParserInterface

Interface implemented by token parsers.

Summary

Methods
Constants
setParser()
parse()
getTag()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setParser()

setParser(\Twig_Parser  $parser) 

Sets the parser associated with this token parser.

Parameters

\Twig_Parser $parser

parse()

parse(\Twig_Token  $token) : \Twig_Node

Parses a token and returns a node.

Parameters

\Twig_Token $token

Throws

\Twig_Error_Syntax

Returns

\Twig_Node

A Twig_Node instance

getTag()

getTag() : string

Gets the tag name associated with this token parser.

Returns

string —

The tag name