]> granicus.if.org Git - php/commitdiff
- Update docu
authorMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 23:21:41 +0000 (23:21 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 23:21:41 +0000 (23:21 +0000)
ext/spl/internal/recursiveiteratoriterator.inc

index bba713ba09a685b052fce1a61e4f623e9ebc161e..65f9a20ba9a76ec281c47ddec653090aca1afd70 100755 (executable)
@@ -92,9 +92,9 @@ class RecursiveIteratorIterator implements OuterIterator
                while ($this->count) {
                        $it = $this->ait[$this->count];
                        if ($it->valid()) {
-                               if (!$it->recursed && $it->hasChildren()) {
+                               if (!$it->recursed && callHasChildren()) {
                                        $it->recursed = true;
-                                       $sub = $it->getChildren();
+                                       $sub = callGetChildren();
                                        $sub->recursed = false;
                                        $sub->rewind();
                                        if ($sub->valid()) {
@@ -147,14 +147,32 @@ class RecursiveIteratorIterator implements OuterIterator
        {
                return $this->level;
        }
-       
+
+       /** @return whether current sub iterators current element has children
+        * @since PHP 5.1
+        */
+       function callHasChildren()
+       {
+               return $this->ait[$this->count]->hasChildren();
+       }
+
+       /** @return current sub iterators current children
+        * @since PHP 5.1
+        */
+       function callGetChildren()
+       {
+               return $this->ait[$this->count]->getChildren();
+       }
+
        /** Called right after calling getChildren()
+        * @since PHP 5.1
         */
        function beginChildren()
        {
        }
        
        /** Called after current child iterator is invalid
+        * @since PHP 5.1
         */
        function endChildren()
        {