]> granicus.if.org Git - php/commitdiff
- Update docu
authorMarcus Boerger <helly@php.net>
Sun, 31 Oct 2004 19:05:37 +0000 (19:05 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 31 Oct 2004 19:05:37 +0000 (19:05 +0000)
ext/spl/internal/cachingiterator.inc
ext/spl/internal/cachingrecursiveiterator.inc
ext/spl/internal/filteriterator.inc
ext/spl/internal/iteratoriterator.inc
ext/spl/internal/limititerator.inc
ext/spl/internal/outeriterator.inc
ext/spl/internal/parentiterator.inc
ext/spl/internal/recursiveiterator.inc
ext/spl/internal/recursiveiteratoriterator.inc
ext/spl/internal/seekableiterator.inc

index f1b896d05d1932f9bb2dc569726ad4f5b354b96c..59271bfe070c6b7ff4adffe19b3a369eb43f5054 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file cachingiterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class CachingIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
@@ -13,10 +13,19 @@ define('CIT_CALL_TOSTRING', 1);
 define('CIT_CATCH_GET_CHILD', 2);
 
 /**
- * @brief   Cached Iteration over another Iterator
+ * @brief   Cached iteration over another Iterator
  * @author  Marcus Boerger
  * @version 1.1
  *
+ * This iterator wrapper does a one ahead iteration. This way it knows whether
+ * the inner iterator has one more element.
+ *
+ * @note If you want to convert the elements into strings and the inner 
+ *       Iterator is an internal Iterator then you need to provide the 
+ *       flag CIT_CALL_TOSTRING to do the conversion when the actual element
+ *       is being fetched. Otherwise the conversion would happen with the
+ *       already changed iterator. If you do not need this then it you should
+ *       omit this flag because it costs unneccessary work and time.
  */
 class CachingIterator implements OuterIterator
 {
@@ -98,6 +107,9 @@ class CachingIterator implements OuterIterator
        }
 
        /** Aggregate the inner iterator
+        *
+        * @param func    Name of method to invoke
+        * @param params  Array of parameters to pass to method
         */
        function __call($func, $params)
        {
index d731c7a725a33ebf9b2b004c293301577131566a..05012cd478febb06a51c06c843d74636c31ffcaf 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file cachingrecursiveiterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class CachingRecursiveIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
  */
 
 /**
- * @brief   
+ * @brief   Cached recursive iteration over another Iterator
  * @author  Marcus Boerger
  * @version 1.1
+ *
+ * @See CachingIterator
  */
 class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator
 {
index c5f27bd47d1680d4b93ca60464a33d5a01e8c4f7..b3415434fe7e73345b9f1416aeb1fec86ef51822 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file filteriterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class FilterIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
@@ -109,6 +109,16 @@ abstract class FilterIterator implements OuterIterator
        {
                return $this->it;
        }
+
+       /** Aggregate the inner iterator
+        *
+        * @param func    Name of method to invoke
+        * @param params  Array of parameters to pass to method
+        */
+       function __call($func, $params)
+       {
+               return call_user_func_array(array($this->it, $func), $params);
+       }
 }
 
 ?>
\ No newline at end of file
index 03cbc9f8762c06125a7a630fe09ffbcbeeb02607..68828cea535eb2d5031432f40fad7394a17b3b6e 100755 (executable)
@@ -77,6 +77,16 @@ class IteratorIterator implements OuterIterator
                return $this->iterator->rewind();
        }
 
+       /** Aggregate the inner iterator
+        *
+        * @param func    Name of method to invoke
+        * @param params  Array of parameters to pass to method
+        */
+       function __call($func, $params)
+       {
+               return call_user_func_array(array($this->it, $func), $params);
+       }
+
        /** The inner iterator must be private because when this class will be
         * converted to c code it won't no longer be available.
         */
index 0a27707079631f6bd1e01f7b208ce2ac203a95f6..e81874e791152fd6b6405ee260d47087afb26bdf 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file limititerator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class LimitIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
@@ -113,6 +113,16 @@ class LimitIterator implements OuterIterator
        {
                return $this->it;
        }
+
+       /** Aggregate the inner iterator
+        *
+        * @param func    Name of method to invoke
+        * @param params  Array of parameters to pass to method
+        */
+       function __call($func, $params)
+       {
+               return call_user_func_array(array($this->it, $func), $params);
+       }
 }
 
 ?>
\ No newline at end of file
index 712212aba34fc108f40ebbc4f13f0391b0bb47e7..c8a7faab2cf6c8ee0684898141fb26d40dac9c73 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file outeriterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class OuterIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
index 9d3c59d290f15406dcab2fb4aada0b2f91d6f9ac..114941679cb5af9aaaae8537a904ae50d2a79d5e 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file parentiterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class FilterIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
index 3bb0d8d0ff07fb72d9171365e4c7afdcba854f63..02bf1a8d9112a114e1dea2e2ede74ecea66d96eb 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file recursiveiterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class RecursiveIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
index d2c9956030eda015e7b0e3baa4639d63ea751c00..86801ac13fa77ce527090e48b35d85b6c7fb0ea3 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file recursiveiteratoriterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class RecursiveIteratorIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004
index 2cc5331aa18e9e0751b2bd00f2996622adead809..81c4b01efe428b10b8323107c870af4a5b1cc3ef 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 
 /** @file seekableiterator.inc
- * @ingroup Internal
+ * @ingroup SPL
  * @brief class SeekableIterator
  * @author  Marcus Boerger
  * @date    2003 - 2004