Node Tree class for Zend\Server reflection operations

package Default

 Methods

Constructor

__construct(mixed $value, \Zend\Server\Reflection\Node $parent = null) : \Zend\Server\Reflection\Node

Parameters

$value

mixed

$parent

\Zend\Server\Reflection\Node

Optional

Returns

\Zend\Server\Reflection\Node

Attach a child node

attachChild(\Zend\Server\Reflection\Node $node) : void

Parameters

$node

\Zend\Server\Reflection\Node

Create and attach a new child node

createChild(mixed $value) : \Zend\Server\Reflection\Node
access public

Parameters

$value

mixed

Returns

\Zend\Server\Reflection\NodeNew child node

Return an array of all child nodes

getChildren() : array

Returns

array

Retrieve the bottommost nodes of this node's tree

getEndPoints() : array

Retrieves the bottommost nodes of the tree by recursively calling getEndPoints() on all children. If a child is null, it returns the parent as an end point.

Returns

array

Return the parent node

getParent() : null | \Zend\Server\Reflection\Node

Returns

null\Zend\Server\Reflection\Node

Return the node's current value

getValue() : mixed

Returns

mixed

Does this node have children?

hasChildren() : boolean

Returns

boolean

Set parent node

setParent(\Zend\Server\Reflection\Node $node, boolean $new = false) : void

Parameters

$node

\Zend\Server\Reflection\Node

$new

boolean

Whether or not the child node is newly created and should always be attached

Set the node value

setValue(mixed $value) : void

Parameters

$value

mixed

 Properties

 

Array of child nodes (if any)

$children : array

Default

array()
 

Parent node (if any)

$parent : \Zend\Server\Reflection\Node

Default

null
 

Node value

$value : mixed

Default

null