Documentation

Mention extends Link
in package

Table of Contents

Properties

$data  : Data
$depth  : int
$firstChild  : Node|null
$lastChild  : Node|null
$next  : Node|null
$parent  : Node|null
$previous  : Node|null
$title  : string|null
$url  : string
$identifier  : string
$name  : string
$prefix  : string

Methods

__clone()  : mixed
Clone the current node and its children
__construct()  : mixed
appendChild()  : void
assertInstanceOf()  : void
children()  : array<string|int, Node>
detach()  : void
detachChildren()  : void
Detaches all child nodes of given node
firstChild()  : Node|null
getDepth()  : int
getIdentifier()  : string
getLabel()  : string|null
getName()  : string|null
getPrefix()  : string
getTitle()  : string|null
getUrl()  : string
hasChildren()  : bool
hasUrl()  : bool
insertAfter()  : void
Inserts the $sibling node after $this
insertBefore()  : void
Inserts the $sibling node before $this
iterator()  : NodeIterator
lastChild()  : Node|null
next()  : Node|null
parent()  : Node|null
prependChild()  : void
Adds $child as the very first child of $this
previous()  : Node|null
replaceChildren()  : void
Replace all children of given node with collection of another
replaceWith()  : void
setLabel()  : $this
setTitle()  : void
setUrl()  : void
walker()  : NodeWalker
setParent()  : void
findLabelNode()  : Text|null

Properties

$depth

protected int $depth = 0
Tags
psalm-readonly-allow-private-mutation

$firstChild

protected Node|null $firstChild = null
Tags
psalm-readonly-allow-private-mutation

$lastChild

protected Node|null $lastChild = null
Tags
psalm-readonly-allow-private-mutation

$next

protected Node|null $next = null
Tags
psalm-readonly-allow-private-mutation

$parent

protected Node|null $parent = null
Tags
psalm-readonly-allow-private-mutation

$previous

protected Node|null $previous = null
Tags
psalm-readonly-allow-private-mutation

$title

protected string|null $title = null

$identifier

private string $identifier

Methods

__clone()

Clone the current node and its children

public __clone() : mixed

WARNING: This is a recursive function and should not be called on deeply-nested node trees!

__construct()

public __construct(string $name, string $prefix, string $identifier[, string|null $label = null ]) : mixed
Parameters
$name : string
$prefix : string
$identifier : string
$label : string|null = null

appendChild()

public appendChild(Node $child) : void
Parameters
$child : Node

assertInstanceOf()

public static assertInstanceOf(Node $node) : void
Parameters
$node : Node

children()

public children() : array<string|int, Node>
Return values
array<string|int, Node>

detach()

public detach() : void

detachChildren()

Detaches all child nodes of given node

public detachChildren() : void

firstChild()

public firstChild() : Node|null
Return values
Node|null

getDepth()

public getDepth() : int
Return values
int

getIdentifier()

public getIdentifier() : string
Return values
string

getLabel()

public getLabel() : string|null
Return values
string|null

getName()

public getName() : string|null
Return values
string|null

getPrefix()

public getPrefix() : string
Return values
string

getTitle()

public getTitle() : string|null
Return values
string|null

hasChildren()

public hasChildren() : bool
Return values
bool

hasUrl()

public hasUrl() : bool
Return values
bool

insertAfter()

Inserts the $sibling node after $this

public insertAfter(Node $sibling) : void
Parameters
$sibling : Node

insertBefore()

Inserts the $sibling node before $this

public insertBefore(Node $sibling) : void
Parameters
$sibling : Node

lastChild()

public lastChild() : Node|null
Return values
Node|null

prependChild()

Adds $child as the very first child of $this

public prependChild(Node $child) : void
Parameters
$child : Node

previous()

public previous() : Node|null
Return values
Node|null

replaceChildren()

Replace all children of given node with collection of another

public replaceChildren(iterable<string|int, Node$children) : void
Parameters
$children : iterable<string|int, Node>

replaceWith()

public replaceWith(Node $replacement) : void
Parameters
$replacement : Node

setLabel()

public setLabel(string $label) : $this
Parameters
$label : string
Return values
$this

setTitle()

public setTitle(string|null $title) : void
Parameters
$title : string|null

setParent()

protected setParent([Node|null $node = null ]) : void
Parameters
$node : Node|null = null

        
On this page

Search results