Interface Twig_TokenParserInterface

Implemented byTwig_TokenParser, Twig_TokenParser_AutoEscape, Twig_TokenParser_Block, Twig_TokenParser_Do, Twig_TokenParser_Embed, Twig_TokenParser_Extends, Twig_TokenParser_Filter, Twig_TokenParser_Flush, Twig_TokenParser_For, Twig_TokenParser_From, Twig_TokenParser_If, Twig_TokenParser_Import, Twig_TokenParser_Include, Twig_TokenParser_Macro, Twig_TokenParser_Sandbox, Twig_TokenParser_Set, Twig_TokenParser_Spaceless, Twig_TokenParser_Use

Interface implemented by token parsers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getTag() Gets the tag name associated with this token parser. Twig_TokenParserInterface
parse() Parses a token and returns a node. Twig_TokenParserInterface
setParser() Sets the parser associated with this token parser. Twig_TokenParserInterface

Method Details

getTag() public abstract method

Gets the tag name associated with this token parser.

public abstract string getTag ( )
return string

The tag name

parse() public abstract method

Parses a token and returns a node.

public abstract Twig_NodeInterface parse ( Twig_Token $token )
$token Twig_Token

A Twig_Token instance

return Twig_NodeInterface

A Twig_NodeInterface instance

throws Twig_Error_Syntax
setParser() public abstract method

Sets the parser associated with this token parser.

public abstract void setParser ( Twig_Parser $parser )
$parser Twig_Parser

A Twig_Parser instance