\Twig_Node_Expression_Test_Defined
Checks if a variable is defined in the current context.
<pre>
{# defined works with variable names and variable attributes #}
{% if foo is defined %}
{# ... #}
{% endif %}
</pre>
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Twig_Node_Expression_Test_Defined
extends Twig_Node_Expression_Test
{
- // Inherited members from Twig_Node
- protected $nodes;
- protected $attributes;
- protected $lineno;
- protected $tag;
- // methods
- public void __construct()
- protected void changeIgnoreStrictCheck()
- public void compile()
- // Inherited methods from Twig_Node_Expression_Test
- public void __construct()
- public void compile()
- // Inherited methods from Twig_Node_Expression_Call
- protected void compileCallable()
- protected void compileArguments()
- protected void getArguments()
- protected void normalizeName()
- // Inherited methods from Twig_Node
- public void __construct()
- public void __toString()
- public void toXml()
- public void compile()
- public void getLine()
- public void getNodeTag()
- public Boolean hasAttribute()
- public mixed getAttribute()
- public void setAttribute()
- public void removeAttribute()
- public Boolean hasNode()
- public Twig_Node getNode()
- public void setNode()
- public void removeNode()
- public void count()
- public void getIterator()
Hierarchy
Extends
Members
protected
- $attributes
- $lineno
- $nodes
- $tag
Methods
protected
public
Inherited from Twig_Node_Expression_Test
public
Inherited from Twig_Node_Expression_Call
protected
Inherited from Twig_Node
public
- __toString()
- compile()
- count()
- getAttribute() — Gets an attribute.
- getIterator()
- getLine()
- getNode() — Gets a node by name.
- getNodeTag()
- hasAttribute() — Returns true if the attribute is defined.
- hasNode() — Returns true if the node with the given identifier exists.
- removeAttribute() — Removes an attribute.
- removeNode() — Removes a node by name.
- setAttribute() — Sets an attribute.
- setNode() — Sets a node.
- toXml()