AbstractNode
in package
implements
NodeInterface
AbstractYes
Abstract node class
Tags
Table of Contents
Interfaces
- NodeInterface
- Node interface
Properties
- $childNodes : array<string|int, mixed>
- Object child nodes
- $indent : string|null
- Indentation for formatting purposes
- $output : string|null
- Child output
- $parent : AbstractNode|null
- Parent node
Methods
- addChild() : AbstractNode
- Add a child to the object
- addChildren() : AbstractNode
- Add children to the object
- getChild() : Child|null
- Get the child nodes of the object
- getChildNodes() : array<string|int, mixed>
- Get the child nodes of the object (alias)
- getChildren() : array<string|int, mixed>
- Get the child nodes of the object
- getIndent() : string
- Return the indent
- getParent() : AbstractNode|null
- Return the parent node
- hasChildNodes() : bool
- Get whether or not the child object has children (alias)
- hasChildren() : bool
- Get whether or not the child object has children
- removeChild() : void
- Remove all child nodes from the object
- removeChildren() : void
- Remove all child nodes from the object
- setIndent() : AbstractNode
- Set the indent
- setParent() : AbstractNode
- Set the parent node
Properties
$childNodes
Object child nodes
protected
array<string|int, mixed>
$childNodes
= []
$indent
Indentation for formatting purposes
protected
string|null
$indent
= null
$output
Child output
protected
string|null
$output
= null
$parent
Parent node
protected
AbstractNode|null
$parent
= null
Methods
addChild()
Add a child to the object
public
addChild(Child $c) : AbstractNode
Parameters
- $c : Child
Tags
Return values
AbstractNodeaddChildren()
Add children to the object
public
addChildren(mixed $children) : AbstractNode
Parameters
- $children : mixed
Tags
Return values
AbstractNodegetChild()
Get the child nodes of the object
public
getChild(int $i) : Child|null
Parameters
- $i : int
Return values
Child|nullgetChildNodes()
Get the child nodes of the object (alias)
public
getChildNodes() : array<string|int, mixed>
Return values
array<string|int, mixed>getChildren()
Get the child nodes of the object
public
getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed>getIndent()
Return the indent
public
getIndent() : string
Return values
stringgetParent()
Return the parent node
public
getParent() : AbstractNode|null
Return values
AbstractNode|nullhasChildNodes()
Get whether or not the child object has children (alias)
public
hasChildNodes() : bool
Return values
boolhasChildren()
Get whether or not the child object has children
public
hasChildren() : bool
Return values
boolremoveChild()
Remove all child nodes from the object
public
removeChild(int $i) : void
Parameters
- $i : int
removeChildren()
Remove all child nodes from the object
public
removeChildren() : void
setIndent()
Set the indent
public
setIndent(string $indent) : AbstractNode
Parameters
- $indent : string
Return values
AbstractNodesetParent()
Set the parent node
public
setParent(AbstractNode $parent) : AbstractNode
Parameters
- $parent : AbstractNode