class League / CommonMark / Node / Node
You are viewing an older version of the documentation. For the latest, please visit 2.4 documentation.
abstract

Node

Properties

public

$data

Default: null
protected

$depth

protected

$parent

Default: null
protected

$previous

Default: null
protected

$next

Default: null
protected

$firstChild

Default: null
protected

$lastChild

Default: null

Methods

public

__construct ( ) : void

public

previous ( ) : void

public

next ( ) : void

public

parent ( ) : void

protected

setParent ( Node $node ) : void

public

insertAfter ( Node $sibling ) : void

Inserts the $sibling node after $this

public

insertBefore ( Node $sibling ) : void

Inserts the $sibling node before $this

public

replaceWith ( Node $replacement ) : void

public

detach ( ) : void

public

hasChildren ( ) : void

public

firstChild ( ) : void

public

lastChild ( ) : void

public

children ( ) : Node[]

public

appendChild ( Node $child ) : void

public

prependChild ( Node $child ) : void

Adds $child as the very first child of $this

public

detachChildren ( ) : void

Detaches all child nodes of given node

public

replaceChildren ( iterable $children ) : void

Replace all children of given node with collection of another

Parameters

  • $children iterable<\Node>
public

getDepth ( ) : void

public

walker ( ) : void

public

iterator ( int $flags ) : void

public

__clone ( ) : void

Clone the current node and its children

public static

assertInstanceOf ( Node $node ) : void