PHP Class Bolt\Twig\SwitchTokenParser
Usage:
{% set foo = 1 %}
{% switch foo %}
{% case 1 %}
Foo was equal to the number one.
{% case 2 %}
Foo was two.
{% default %}
This is the default fallback.
{% endswitch %}
Show file
Open project: bolt/bolt
Public Methods
Method Details
decideIfEnd()
public method
decideIfFork()
public method
Gets the tag name associated with this token parser.
Parses a token and returns a node.
public parse ( Twig_Token $token ) : Twig_Node |
$token |
Twig_Token |
A Token instance |
return |
Twig_Node |
A Twig node instance |