Methods |
public
|
getParent(): static|null
Get the parent of the object
Get the parent of the object
|
#
|
public
|
getChildren(): static[]
Get the children of the object
Get the children of the object
|
#
|
public
|
setParent(static|null $parent): $this
Set or unset the parent of the object
Set or unset the parent of the object
$child->setParent($parent) is equivalent to
$parent->addChild($child)
$child->setParent(null) is equivalent to
$parent->removeChild($child)
|
#
|
public
|
addChild(static $child): $this
Add a child to the object
Add a child to the object
$parent->addChild($child) is equivalent to
$child->setParent($parent) .
|
#
|
public
|
removeChild(static $child): $this
Remove a child from the object
Remove a child from the object
$parent->removeChild($child) is equivalent to
$child->setParent(null) .
|
#
|
public
|
getDepth(): int
Get the length of the path to the object's root node
Get the length of the path to the object's root node
|
#
|
public
|
countDescendants(): int
Get the number of objects descended from the object
Get the number of objects descended from the object
|
#
|