TwigTokenParserTryCatch
extends AbstractTokenParser
in package
Handles try/catch in template file.
{% try %}
Table of Contents
Methods
- decideCatch() : bool
- decideEnd() : bool
- getTag() : string
- Gets the tag name associated with this token parser.
- parse() : TwigNodeTryCatch
- Parses a token and returns a node.
Methods
decideCatch()
public
decideCatch(Token $token) : bool
Parameters
- $token : Token
Return values
booldecideEnd()
public
decideEnd(Token $token) : bool
Parameters
- $token : Token
Return values
boolgetTag()
Gets the tag name associated with this token parser.
public
getTag() : string
Return values
string —The tag name
parse()
Parses a token and returns a node.
public
parse(Token $token) : TwigNodeTryCatch
Parameters
- $token : Token