TreeNode
in package
FinalYes
Tags
Table of Contents
Properties
- $children : array<string|int, mixed>
- $node : TNode
- $parent : self|null
- $root : TreeNode<string|int, DocumentNode>
Methods
- addChild() : void
- createFromDocument() : TreeNode<string|int, DocumentNode>
- findPosition() : int|null
- getChildren() : array<string|int, TreeNode<string|int, Node>>
- getNode() : TNode
- getParent() : TreeNode|null
- getRoot() : self
- isLastChildOfParent() : bool
- pushChild() : void
- removeChild() : void
- replaceChild() : void
- __construct() : mixed
- createFromCompoundNode() : array<string|int, TreeNode<string|int, Node>>
- createFromNode() : TreeNode<string|int, TValue>
- setChildren() : void
- setRoot() : void
Properties
$children
private
array<string|int, mixed>
$children
= []
$node
private
TNode
$node
$parent
private
self|null
$parent
= null
$root
private
TreeNode<string|int, DocumentNode>
$root
Methods
addChild()
public
addChild(Node $child) : void
Parameters
- $child : Node
createFromDocument()
public
static createFromDocument(DocumentNode $document) : TreeNode<string|int, DocumentNode>
Parameters
- $document : DocumentNode
Return values
TreeNode<string|int, DocumentNode>findPosition()
public
findPosition(Node $node) : int|null
Parameters
- $node : Node
Return values
int|nullgetChildren()
public
getChildren() : array<string|int, TreeNode<string|int, Node>>
Return values
array<string|int, TreeNode<string|int, Node>>getNode()
public
getNode() : TNode
Return values
TNodegetParent()
public
getParent() : TreeNode|null
Return values
TreeNode|nullgetRoot()
public
getRoot() : self
Return values
selfisLastChildOfParent()
public
isLastChildOfParent() : bool
Return values
boolpushChild()
public
pushChild(Node $child) : void
Parameters
- $child : Node
removeChild()
public
removeChild(Node $node) : void
Parameters
- $node : Node
replaceChild()
public
replaceChild(Node $oldChildNode, Node $newChildNode) : void
Parameters
__construct()
private
__construct(Node $node[, self|null $parent = null ]) : mixed
Parameters
- $node : Node
- $parent : self|null = null
createFromCompoundNode()
private
static createFromCompoundNode(CompoundNode<string|int, Node> $node, self|null $parent) : array<string|int, TreeNode<string|int, Node>>
Parameters
- $node : CompoundNode<string|int, Node>
- $parent : self|null
Return values
array<string|int, TreeNode<string|int, Node>>createFromNode()
private
static createFromNode(TValue $node[, self|null $parent = null ]) : TreeNode<string|int, TValue>
Parameters
- $node : TValue
- $parent : self|null = null
Return values
TreeNode<string|int, TValue>setChildren()
private
setChildren(array<string|int, mixed> $children) : void
Parameters
- $children : array<string|int, mixed>
setRoot()
private
setRoot(self $root) : void
Parameters
- $root : self