class Twig_TokenParser_Set extends Twig_TokenParser
Defines a variable.
<pre>
{% set foo = 'foo' %}
{% set foo = [1, 2] %}
{% set foo = {'foo': 'bar'} %}
{% set foo = 'foo' ~ 'bar' %}
{% set foo, bar = 'foo', 'bar' %}
{% set foo %}Some content{% endset %}
</pre>
Methods
|
setParser(Twig_Parser $parser)
Sets the parser associated with this token parser |
from Twig_TokenParser | |
| Twig_NodeInterface |
parse(Twig_Token $token)
Parses a token and returns a node. |
|
| decideBlockEnd(Twig_Token $token) | ||
| string |
getTag()
Gets the tag name associated with this token parser. |
Details
in Twig_TokenParser at line 29
public
setParser(Twig_Parser $parser)
Sets the parser associated with this token parser
at line 38
public Twig_NodeInterface
parse(Twig_Token $token)
Parses a token and returns a node.
at line 70
public
decideBlockEnd(Twig_Token $token)
at line 80
public string
getTag()
Gets the tag name associated with this token parser.