cvs: php-src /ext/spl/internal cachingiterator.inc cachingrecursiveiterator.inc filteriterator.inc iteratoriterator.inc limititerator.inc
outeriterator.inc parentiterator.inc recursiveiterator.inc recursiveiteratoriterator.inc seekableiterator.inc
| From: | Marcus Boerger | Date: | Sun, 31 Oct 2004 19:05:37 +0000 |
| Subject: | cvs: php-src /ext/spl/internal cachingiterator.inc cachingrecursiveiterator.inc filteriterator.inc iteratoriterator.inc limititerator.inc outeriterator.inc parentiterator.inc recursiveiterator.inc recursiveiteratoriterator.inc seekableiterator.inc |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-29070@lists.php.net to get a copy of this message | ||
helly Sun Oct 31 14:05:37 2004 EDT
Modified files:
/php-src/ext/spl/internal cachingiterator.inc
cachingrecursiveiterator.inc
filteriterator.inc iteratoriterator.inc
limititerator.inc outeriterator.inc
parentiterator.inc recursiveiterator.inc
recursiveiteratoriterator.inc
seekableiterator.inc
Log:
- Update docu
http://cvs.php.net/diff.php/php-src/ext/spl/internal/cachingiterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/cachingiterator.inc diff -u php-src/ext/spl/internal/cachingiterator.inc:1.3 php-src/ext/spl/internal/cachingiterator.inc:1.4 --- php-src/ext/spl/internal/cachingiterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/cachingiterator.inc Sun Oct 31 14:05:36 2004 @@ -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_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 @@ } /** Aggregate the inner iterator + * + * @param func Name of method to invoke + * @param params Array of parameters to pass to method */ function __call($func, $params) { http://cvs.php.net/diff.php/php-src/ext/spl/internal/cachingrecursiveiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/cachingrecursiveiterator.inc diff -u php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.2 php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.3 --- php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/cachingrecursiveiterator.inc Sun Oct 31 14:05:36 2004 @@ -1,7 +1,7 @@ <?php /** @file cachingrecursiveiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class CachingRecursiveIterator * @author Marcus Boerger * @date 2003 - 2004 @@ -10,9 +10,11 @@ */ /** - * @brief + * @brief Cached recursive iteration over another Iterator * @author Marcus Boerger * @version 1.1 + * + * @See CachingIterator */ class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator { http://cvs.php.net/diff.php/php-src/ext/spl/internal/filteriterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/filteriterator.inc diff -u php-src/ext/spl/internal/filteriterator.inc:1.3 php-src/ext/spl/internal/filteriterator.inc:1.4 --- php-src/ext/spl/internal/filteriterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/filteriterator.inc Sun Oct 31 14:05:36 2004 @@ -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 @@ { 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 http://cvs.php.net/diff.php/php-src/ext/spl/internal/iteratoriterator.inc?r1=1.1&r2=1.2&ty=u Index: php-src/ext/spl/internal/iteratoriterator.inc diff -u php-src/ext/spl/internal/iteratoriterator.inc:1.1 php-src/ext/spl/internal/iteratoriterator.inc:1.2 --- php-src/ext/spl/internal/iteratoriterator.inc:1.1 Sun Oct 31 13:43:00 2004 +++ php-src/ext/spl/internal/iteratoriterator.inc Sun Oct 31 14:05:36 2004 @@ -77,6 +77,16 @@ 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. */ http://cvs.php.net/diff.php/php-src/ext/spl/internal/limititerator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/limititerator.inc diff -u php-src/ext/spl/internal/limititerator.inc:1.3 php-src/ext/spl/internal/limititerator.inc:1.4 --- php-src/ext/spl/internal/limititerator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/limititerator.inc Sun Oct 31 14:05:36 2004 @@ -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 @@ { 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 http://cvs.php.net/diff.php/php-src/ext/spl/internal/outeriterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/outeriterator.inc diff -u php-src/ext/spl/internal/outeriterator.inc:1.2 php-src/ext/spl/internal/outeriterator.inc:1.3 --- php-src/ext/spl/internal/outeriterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/outeriterator.inc Sun Oct 31 14:05:36 2004 @@ -1,7 +1,7 @@ <?php /** @file outeriterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class OuterIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/parentiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/parentiterator.inc diff -u php-src/ext/spl/internal/parentiterator.inc:1.2 php-src/ext/spl/internal/parentiterator.inc:1.3 --- php-src/ext/spl/internal/parentiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/parentiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file parentiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class FilterIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/recursiveiterator.inc diff -u php-src/ext/spl/internal/recursiveiterator.inc:1.2 php-src/ext/spl/internal/recursiveiterator.inc:1.3 --- php-src/ext/spl/internal/recursiveiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/recursiveiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file recursiveiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class RecursiveIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiteratoriterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/recursiveiteratoriterator.inc diff -u php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.3 php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.4 --- php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/recursiveiteratoriterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file recursiveiteratoriterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class RecursiveIteratorIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/seekableiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/seekableiterator.inc diff -u php-src/ext/spl/internal/seekableiterator.inc:1.2 php-src/ext/spl/internal/seekableiterator.inc:1.3 --- php-src/ext/spl/internal/seekableiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/seekableiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file seekableiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class SeekableIterator * @author Marcus Boerger * @date 2003 - 2004
http://cvs.php.net/diff.php/php-src/ext/spl/internal/cachingiterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/cachingiterator.inc diff -u php-src/ext/spl/internal/cachingiterator.inc:1.3 php-src/ext/spl/internal/cachingiterator.inc:1.4 --- php-src/ext/spl/internal/cachingiterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/cachingiterator.inc Sun Oct 31 14:05:36 2004 @@ -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_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 @@ } /** Aggregate the inner iterator + * + * @param func Name of method to invoke + * @param params Array of parameters to pass to method */ function __call($func, $params) { http://cvs.php.net/diff.php/php-src/ext/spl/internal/cachingrecursiveiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/cachingrecursiveiterator.inc diff -u php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.2 php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.3 --- php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/cachingrecursiveiterator.inc Sun Oct 31 14:05:36 2004 @@ -1,7 +1,7 @@ <?php /** @file cachingrecursiveiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class CachingRecursiveIterator * @author Marcus Boerger * @date 2003 - 2004 @@ -10,9 +10,11 @@ */ /** - * @brief + * @brief Cached recursive iteration over another Iterator * @author Marcus Boerger * @version 1.1 + * + * @See CachingIterator */ class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator { http://cvs.php.net/diff.php/php-src/ext/spl/internal/filteriterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/filteriterator.inc diff -u php-src/ext/spl/internal/filteriterator.inc:1.3 php-src/ext/spl/internal/filteriterator.inc:1.4 --- php-src/ext/spl/internal/filteriterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/filteriterator.inc Sun Oct 31 14:05:36 2004 @@ -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 @@ { 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 http://cvs.php.net/diff.php/php-src/ext/spl/internal/iteratoriterator.inc?r1=1.1&r2=1.2&ty=u Index: php-src/ext/spl/internal/iteratoriterator.inc diff -u php-src/ext/spl/internal/iteratoriterator.inc:1.1 php-src/ext/spl/internal/iteratoriterator.inc:1.2 --- php-src/ext/spl/internal/iteratoriterator.inc:1.1 Sun Oct 31 13:43:00 2004 +++ php-src/ext/spl/internal/iteratoriterator.inc Sun Oct 31 14:05:36 2004 @@ -77,6 +77,16 @@ 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. */ http://cvs.php.net/diff.php/php-src/ext/spl/internal/limititerator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/limititerator.inc diff -u php-src/ext/spl/internal/limititerator.inc:1.3 php-src/ext/spl/internal/limititerator.inc:1.4 --- php-src/ext/spl/internal/limititerator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/limititerator.inc Sun Oct 31 14:05:36 2004 @@ -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 @@ { 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 http://cvs.php.net/diff.php/php-src/ext/spl/internal/outeriterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/outeriterator.inc diff -u php-src/ext/spl/internal/outeriterator.inc:1.2 php-src/ext/spl/internal/outeriterator.inc:1.3 --- php-src/ext/spl/internal/outeriterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/outeriterator.inc Sun Oct 31 14:05:36 2004 @@ -1,7 +1,7 @@ <?php /** @file outeriterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class OuterIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/parentiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/parentiterator.inc diff -u php-src/ext/spl/internal/parentiterator.inc:1.2 php-src/ext/spl/internal/parentiterator.inc:1.3 --- php-src/ext/spl/internal/parentiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/parentiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file parentiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class FilterIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/recursiveiterator.inc diff -u php-src/ext/spl/internal/recursiveiterator.inc:1.2 php-src/ext/spl/internal/recursiveiterator.inc:1.3 --- php-src/ext/spl/internal/recursiveiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/recursiveiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file recursiveiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class RecursiveIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiteratoriterator.inc?r1=1.3&r2=1.4&ty=u Index: php-src/ext/spl/internal/recursiveiteratoriterator.inc diff -u php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.3 php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.4 --- php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.3 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/recursiveiteratoriterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file recursiveiteratoriterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class RecursiveIteratorIterator * @author Marcus Boerger * @date 2003 - 2004 http://cvs.php.net/diff.php/php-src/ext/spl/internal/seekableiterator.inc?r1=1.2&r2=1.3&ty=u Index: php-src/ext/spl/internal/seekableiterator.inc diff -u php-src/ext/spl/internal/seekableiterator.inc:1.2 php-src/ext/spl/internal/seekableiterator.inc:1.3 --- php-src/ext/spl/internal/seekableiterator.inc:1.2 Fri Oct 29 16:58:58 2004 +++ php-src/ext/spl/internal/seekableiterator.inc Sun Oct 31 14:05:37 2004 @@ -1,7 +1,7 @@ <?php /** @file seekableiterator.inc - * @ingroup Internal + * @ingroup SPL * @brief class SeekableIterator * @author Marcus Boerger * @date 2003 - 2004