Methods |
public
|
__construct()
|
#
|
public
|
previous(): ?Node
|
#
|
public
|
next(): ?Node
|
#
|
public
|
parent(): ?Node
|
#
|
protected
|
setParent(?Node $node = null): void
|
#
|
public
|
insertAfter(Node $sibling): void
Inserts the $sibling node after $this
Inserts the $sibling node after $this
|
#
|
public
|
insertBefore(Node $sibling): void
Inserts the $sibling node before $this
Inserts the $sibling node before $this
|
#
|
public
|
replaceWith(Node $replacement): void
|
#
|
public
|
detach(): void
|
#
|
public
|
hasChildren(): bool
|
#
|
public
|
firstChild(): ?Node
|
#
|
public
|
lastChild(): ?Node
|
#
|
public
|
children(): Node[]
|
#
|
public
|
appendChild(Node $child): void
|
#
|
public
|
prependChild(Node $child): void
Adds $child as the very first child of $this
Adds $child as the very first child of $this
|
#
|
public
|
detachChildren(): void
Detaches all child nodes of given node
Detaches all child nodes of given node
|
#
|
public
|
replaceChildren(iterable<Node> $children): void
Replace all children of given node with collection of another
Replace all children of given node with collection of another
|
#
|
public
|
getDepth(): int
|
#
|
public
|
walker(): NodeWalker
|
#
|
public
|
iterator(int $flags = 0): NodeIterator
|
#
|
public
|
__clone()
Clone the current node and its children WARNING: This is a recursive function and should not be called on deeply-nested node trees!
Clone the current node and its children WARNING: This is a recursive function and should not be called on deeply-nested node trees!
|
#
|
public
static
|
assertInstanceOf(Node $node): void
|
#
|