Detailed Description
NodeIterator is used to iterate over a tree/list built of Nodes using a Depth-First-Algorithm.
Classes used with the NodeIterator must implement the getChildren() and getOID() methods.
The following example shows the usage:
Definition at line 36 of file NodeIterator.php.
Inheritance diagram for NodeIterator:Public Member Functions | |
| __construct ($node, $aggregationKinds=array()) | |
| current () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Member Functions | |
| addToQueue ($nodeList) | |
Protected Attributes | |
| $_end | |
| $_nodeList | |
| $_processedOidList | |
| $_currentNode | |
| $_startNode | |
| $_aggregationKinds | |
Constructor & Destructor Documentation
| __construct | ( | $node, | |
$aggregationKinds = array() |
|||
| ) |
Constructor.
- Parameters
-
$node The node to start from. $aggregationKinds Array of aggregation kind values of relations to follow possible values: 'none', 'shared', 'composite'. Empty array means all (default: empty)
Definition at line 51 of file NodeIterator.php.
Member Function Documentation
| current | ( | ) |
| key | ( | ) |
Return the key of the current element.
- Returns
- String, the serialized object id
Definition at line 72 of file NodeIterator.php.
| next | ( | ) |
Move forward to next element.
Definition at line 79 of file NodeIterator.php.
| rewind | ( | ) |
Rewind the Iterator to the first element.
Definition at line 126 of file NodeIterator.php.
| valid | ( | ) |
Checks if current position is valid.
Definition at line 136 of file NodeIterator.php.
|
protected |
Add nodes to the processing queue.
- Parameters
-
$nodeList An array of nodes.
Definition at line 144 of file NodeIterator.php.
Member Data Documentation
|
protected |
Definition at line 38 of file NodeIterator.php.
|
protected |
Definition at line 39 of file NodeIterator.php.
|
protected |
Definition at line 40 of file NodeIterator.php.
|
protected |
Definition at line 41 of file NodeIterator.php.
|
protected |
Definition at line 42 of file NodeIterator.php.
|
protected |
Definition at line 43 of file NodeIterator.php.