TreeNode
in package
FinalYes
Tags
Table of Contents
Properties
- $children : array<string|int, Node>>
- $node : TNode
- $parent : Node>|DocumentNode>|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() : Node>|DocumentNode>|null
- getRoot() : DocumentNode>
- 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, Node>>
$children
= []
$node
private
TNode
$node
$parent
private
Node>|DocumentNode>|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() : Node>|DocumentNode>|null
Return values
Node>|DocumentNode>|nullgetRoot()
public
getRoot() : DocumentNode>
Return values
DocumentNode>isLastChildOfParent()
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, Node>|DocumentNode>|null $parent) : array<string|int, TreeNode<string|int, Node>>
Parameters
- $node : CompoundNode<string|int, Node>
- $parent : Node>|DocumentNode>|null
Return values
array<string|int, TreeNode<string|int, Node>>createFromNode()
private
static createFromNode(TValue $node[, Node>|DocumentNode>|null $parent = null ]) : TreeNode<string|int, TValue>
Parameters
- $node : TValue
- $parent : Node>|DocumentNode>|null = null
Return values
TreeNode<string|int, TValue>setChildren()
private
setChildren(array<string|int, Node>> $children) : void
Parameters
- $children : array<string|int, Node>>
setRoot()
private
setRoot(DocumentNode> $root) : void
Parameters
- $root : DocumentNode>