Represents a node in the AST.
More...
Represents a node in the AST.
- Author
- Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Definition at line 18 of file Node.php.
__construct |
( |
array |
$nodes = array() , |
|
|
array |
$attributes = array() , |
|
|
|
$lineno = 0 , |
|
|
|
$tag = null |
|
) |
| |
Constructor.
The nodes are automatically made available as properties ($this->node). The attributes are automatically made available as array items ($this['name']).
- Parameters
-
array | $nodes | An array of named nodes |
array | $attributes | An array of attributes (should not be nodes) |
integer | $lineno | The line number |
string | $tag | The tag name associated with the Node |
Definition at line 36 of file Node.php.
Gets an attribute.
- Parameters
-
- Returns
- mixed The attribute value
Definition at line 138 of file Node.php.
Returns true if the attribute is defined.
- Parameters
-
- Returns
- Boolean true if the attribute is defined, false otherwise
Definition at line 126 of file Node.php.
Returns true if the node with the given identifier exists.
- Parameters
-
- Returns
- Boolean true if the node with the given name exists, false otherwise
Definition at line 175 of file Node.php.
Removes an attribute.
- Parameters
-
Definition at line 163 of file Node.php.
Removes a node by name.
- Parameters
-
Definition at line 212 of file Node.php.
setAttribute |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Sets an attribute.
- Parameters
-
string | The attribute name |
mixed | The attribute value |
Definition at line 153 of file Node.php.
setNode |
( |
|
$name, |
|
|
|
$node = null |
|
) |
| |
Sets a node.
- Parameters
-
Definition at line 202 of file Node.php.
The documentation for this class was generated from the following file: