lib: Let NodeInterface extend RecursiveIterator

Since a node may have children and they should be iterable, the Nodefinterface
now extends RecursiveIterator.
This commit is contained in:
Eric Lippmann 2014-06-06 13:55:58 +02:00
parent d5cf2f2472
commit 794ae141fa
1 changed files with 3 additions and 15 deletions

View File

@ -4,7 +4,9 @@
namespace Icinga\Data\Tree; namespace Icinga\Data\Tree;
interface NodeInterface use RecursiveIterator;
interface NodeInterface extends RecursiveIterator
{ {
/** /**
* Append a child to the node * Append a child to the node
@ -21,18 +23,4 @@ interface NodeInterface
* @return mixed * @return mixed
*/ */
public function getValue(); public function getValue();
/**
* Whether the node has children
*
* @return bool
*/
public function hasChildren();
/**
* Get the node's children
*
* @return array
*/
public function getChildren();
} }