mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
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:
parent
d5cf2f2472
commit
794ae141fa
@ -4,7 +4,9 @@
|
||||
|
||||
namespace Icinga\Data\Tree;
|
||||
|
||||
interface NodeInterface
|
||||
use RecursiveIterator;
|
||||
|
||||
interface NodeInterface extends RecursiveIterator
|
||||
{
|
||||
/**
|
||||
* Append a child to the node
|
||||
@ -21,18 +23,4 @@ interface NodeInterface
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue();
|
||||
|
||||
/**
|
||||
* Whether the node has children
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasChildren();
|
||||
|
||||
/**
|
||||
* Get the node's children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getChildren();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user