parent
95c937e3fd
commit
0d63e14baf
|
@ -6,7 +6,7 @@ namespace Icinga\Data\Tree;
|
||||||
use Identifiable;
|
use Identifiable;
|
||||||
use IteratorAggregate;
|
use IteratorAggregate;
|
||||||
|
|
||||||
class Node implements Identifiable, IteratorAggregate
|
class TreeNode implements Identifiable, IteratorAggregate
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The node's ID
|
* The node's ID
|
||||||
|
@ -77,11 +77,11 @@ class Node implements Identifiable, IteratorAggregate
|
||||||
/**
|
/**
|
||||||
* Append a child node as the last child of this node
|
* Append a child node as the last child of this node
|
||||||
*
|
*
|
||||||
* @param Node $child The child to append
|
* @param TreeNode $child The child to append
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function appendChild(Node $child)
|
public function appendChild(TreeNode $child)
|
||||||
{
|
{
|
||||||
$this->children[] = $child;
|
$this->children[] = $child;
|
||||||
return $this;
|
return $this;
|
|
@ -21,9 +21,9 @@ class TreeNodeIterator implements RecursiveIterator
|
||||||
/**
|
/**
|
||||||
* Create a new iterator over a tree node's children
|
* Create a new iterator over a tree node's children
|
||||||
*
|
*
|
||||||
* @param Node $node
|
* @param TreeNode $node
|
||||||
*/
|
*/
|
||||||
public function __construct(Node $node)
|
public function __construct(TreeNode $node)
|
||||||
{
|
{
|
||||||
$this->children = new ArrayIterator($node->getChildren());
|
$this->children = new ArrayIterator($node->getChildren());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue