Method |
Description |
|
__construct ( string $type, integer | null $line = null, integer | null $offset = null ) |
Creates a new, detached node without children or a parent. |
|
__debugInfo ( ) |
|
|
__get ( string $key ) : mixed |
Gets called when a property is read from this node. |
|
__isset ( string $key ) : boolean |
Gets called when isset() is called on this node's properties. |
|
__set ( string $key, mixed $value ) |
Gets called when a property is written on this node instance. |
|
__toString ( ) : string |
Gets called when this node instance is casted to a string in any way |
|
__unset ( string $key ) |
Gets called when unset() is called on this node's properties. |
|
append ( Node $node ) |
Appends the given node to this node's children. |
|
dump ( integer $level ) : string |
Dumps the node as a string to ease up debugging. |
|
find ( string $type ) : Generator |
Finds nodes with the given type inside this nodes children. |
|
findArray ( string $type ) : array |
Finds nodes with the given type inside this nodes children. |
|
indexOf ( Node $node ) : integer | false |
Returns the position of the given node inside this node. |
|
insertAfter ( Node $node, Node $newNode ) |
Inserts the second given node after the first given node
inside this node's children. |
|
insertBefore ( Node $node, Node $newNode ) |
Inserts the second given node before the first given node
inside this node's children. |
|
next ( ) : Node | null |
Returns the next sibling of this element or null, if if there isn't any. |
|
prepend ( Node $node ) |
Prepends the given node to this node's children. |
|
prev ( ) : Node | null |
Returns the previous sibling of this element or null, if if there isn't any. |
|
remove ( Node $node ) |
Removes the given child node from this node's children. |
|
text ( string $indentStyle = ' ', string $newLine = "
", integer $level ) : string |
Returns all text and child-texts in a single text. |
|