Interface Twig_TokenParserBrokerInterface

Implemented byTwig_TokenParserBroker
Deprecated since version since 1.12 (to be removed in 2.0)

Interface implemented by token parser brokers.

Token parser brokers allows to implement custom logic in the process of resolving a token parser for a given tag name.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getParser() Gets the Twig_ParserInterface. Twig_TokenParserBrokerInterface
getTokenParser() Gets a TokenParser suitable for a tag. Twig_TokenParserBrokerInterface
setParser() Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of. Twig_TokenParserBrokerInterface

Method Details

getParser() public abstract method

Gets the Twig_ParserInterface.

public abstract null|Twig_ParserInterface getParser ( )
return null|Twig_ParserInterface

A Twig_ParserInterface instance or null

getTokenParser() public abstract method

Gets a TokenParser suitable for a tag.

public abstract null|Twig_TokenParserInterface getTokenParser ( $tag )
$tag string

A tag name

return null|Twig_TokenParserInterface

A Twig_TokenParserInterface or null if no suitable TokenParser was found

setParser() public abstract method

Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.

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

A Twig_ParserInterface interface