37 private $mode = self::LEAVES_ONLY;
64 while ($this->count) {
65 unset($this->ait[$this->count--]);
68 $this->ait[0]->rewind();
69 $this->ait[0]->recursed =
false;
102 return $it->current();
109 while ($this->count) {
113 $it->recursed =
true;
120 if (!($this->flags & self::CATCH_GET_CHILD))
127 $sub->recursed =
false;
132 throw new Exception(get_class($sub).
'::getChildren() must return an object that implements RecursiveIterator');
140 $it->recursed =
false;
144 $it->recursed =
false;
147 unset($this->ait[$this->count--]);
161 if (is_null($level)) {
164 return @$this->ait[$level];
220 || $this->mode == self::LEAVES_ONLY)
Iterates through recursive iterators.
Interface to access the current inner iteraor of iterator wrappers.
const CATCH_GET_CHILD
Flag: Catches exceptions during getChildren() calls and simply jumps to the next element.
const LEAVES_ONLY
Mode: Only show leaves.
nextElement()
Called when the next element is available.
Interface for recursive iteration with RecursiveIteratorIterator.
__construct(RecursiveIterator $it, $mode=self::LEAVES_ONLY, $flags=0)
Construct from RecursiveIterator.
beginChildren()
Called right after calling getChildren() and its rewind().
endChildren()
Called after current child iterator is invalid and right before it gets destructed.
const CHILD_FIRST
Mode: Show all children prior to their parent.
getSubIterator($level=NULL)
callNextElement($after_move)
next()
Forward to next element.
rewind()
Rewind to top iterator as set in constructor.
const SELF_FIRST
Mode: Show parents prior to their children.