Switch_TokenParser
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\Switch_TokenParser »
Twig_TokenParser
- Since
- 1.3
Class Switch_TokenParser that parses {% switch %} tags.
Based on the rejected Twig pull request: https://github.com/fabpot/Twig/pull/185
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
decideIfEnd() | |
decideIfFork() | |
getTag() | Gets the tag name associated with this token parser. |
parse() | Parses a token and returns a node. |
# decideIfEnd()
Signature
public mixed decideIfEnd ( $token )
# decideIfFork()
Signature
public mixed decideIfFork ( $token )
# getTag()
Signature
public string getTag ( )
# parse()
Parses a token and returns a node.
View source (opens new window)
Arguments
$token
(\Twig_Token
)
Returns
Throws
\Twig_Error_Syntax
Signature
public Craft\Switch_Node parse ( \Twig_Token $token )