helly           Mon Nov  1 13:11:40 2004 EDT

  Modified files:              
    /php-src/ext/spl    doxygen.cfg spl.php 
    /php-src/ext/spl/internal   cachingrecursiveiterator.inc 
                                filteriterator.inc limititerator.inc 
                                recursiveiterator.inc 
                                recursiveiteratoriterator.inc 
  Log:
  - Update docu
  
  
http://cvs.php.net/diff.php/php-src/ext/spl/doxygen.cfg?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/spl/doxygen.cfg
diff -u php-src/ext/spl/doxygen.cfg:1.2 php-src/ext/spl/doxygen.cfg:1.3
--- php-src/ext/spl/doxygen.cfg:1.2     Mon Nov  1 11:31:19 2004
+++ php-src/ext/spl/doxygen.cfg Mon Nov  1 13:11:38 2004
@@ -69,7 +69,8 @@
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 INPUT                  = spl.php \
-                         examples
+                         examples \
+                         internal
 FILE_PATTERNS          = *.inc \
                          *.php
 RECURSIVE              = NO
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.38&r2=1.39&ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.38 php-src/ext/spl/spl.php:1.39
--- php-src/ext/spl/spl.php:1.38        Mon Nov  1 13:01:06 2004
+++ php-src/ext/spl/spl.php     Mon Nov  1 13:11:38 2004
@@ -401,57 +401,6 @@
 }
 
 /** @ingroup SPL
- * @brief Recursive iterator
- *
- * Interface for recursive traversal to be used with 
- * RecursiveIteratorIterator.
- */
-interface RecursiveIterator extends Iterator
-{
-       /** @return whether current element can be iterated itself.
-         */
-       function hasChildren();
-
-       /** @return an object that recursively iterates the current element.
-        * This object must implement RecursiveIterator.
-        */
-       function getChildren();
-}
-
-/** @ingroup SPL
- * @brief Class for recursive traversal. 
- *
- * The objects of this class are created by instances of RecursiveIterator. 
- * Elements of those iterators may be traversable themselves. If so these 
- * sub elements are recursed into.
- */
-class RecursiveIteratorIterator implements Iterator
-{
-       /** Construct an instance form a RecursiveIterator.
-        *
-        * @param $iterator inner root iterator
-        * @param $mode one of
-        *            - RIT_LEAVES_ONLY do not return elements that can be recursed.
-        *            - RIT_SELF_FIRST  show elements before their sub elements.
-        *            - RIT_CHILD_FIRST show elements after their sub elements.
-        *
-        * @note If you want to see only those elements which have sub elements then
-        *       use a ParentIterator.
-        */
-       function __construct(RecursiveIterator $iterator, $mode);
-
-       /** @return the level of recursion (>=0).
-        */
-       function getDepth();
-
-       /** @param $level the level of the sub iterator to return.
-        * @return the current inner sub iterator or the iterator at the 
-        * specified $level.
-        */
-       function getSubIterator([$level]);
-}
-
-/** @ingroup SPL
  * @brief This Interface allows to hook into the global count() function.
  */
 interface Countable
@@ -462,21 +411,6 @@
 }
 
 /** @ingroup SPL
- * @brief Seekable iterator
- *
- * This interface is used to optimize LimitIterator functionality. but it 
- * may also be used for other situations where seeking a specific offset is
- * required and easily possible.
- */
-interface SeekableIterator extends Iterator
-{
-       /** Seek to a specific position if available or throw an exception.
-        * @param $position offset to seek to.
-        */
-       function seek($position);
-}
-
-/** @ingroup SPL
  * @brief An Array wrapper
  *
  * This array wrapper allows to recursively iterate over Arrays and public 
@@ -597,142 +531,6 @@
 }
 
 /** @ingroup SPL
- * @brief An iterator that filters other iterators
- * 
- * Iterator that wrapps around another iterator and only returns selected
- * elements of the inner iterator. The only thing that needs to be done to
- * make this work is implementing method accept(). Typically this invloves
- * reading the current element or key of the inner Iterator and checking
- * whether it is acceptable.
- */
-abstract class FilterIterator implements Iterator
-{
-       /** Construct an instance form a Iterator.
-        *
-        * @param $iterator inner iterator
-        */
-       function __construct(Iterator $iterator);
-
-       /** @return whether the current element of the inner iterator should be
-        * used as a current element of this iterator or if it should be skipped.
-        */
-       abstract function accept();
-       
-       /** @return the inner Iterator
-        */
-       function getInnerIterator();
-}
-
-/** @ingroup SPL
- * @brief Limiting iterator
- *
- * A class that starts iteration at a certain offset and only iterates over
- * a specified amount of elements.
- *
- * This class uses SeekableIterator::seek() if available and rewind() plus
- * a skip loop otehrwise.
- */
-class LimitIterator implements Iterator
-{
-       /** Construct an instance form a Iterator.
-        *
-        * @param $iterator inner iterator
-        * @param $offset   starting position (zero based)
-        * @param $count    amount of elements returned, if available)
-        */
-       function __construct(Iterator $iterator, $offset = 0, $count = -1);
-
-       /** @return whether the current element of the inner iterator should be
-        * used as a current element of this iterator or if it should be skipped.
-        */
-       abstract function accept();
-       
-       /** @return the inner Iterator
-        */
-       function getInnerIterator();
-       
-       /** Seek to a specific position if available or throw an exception.
-        * If the inner iterator is an instance of SeekableIterator its seek()
-        * method will be used. Otherwise the iterator will be rewound if
-        * necessary and then manually advanced element by element.
-        *
-        * @param $position index to seek to.
-        */
-       function seek($position);
-       
-       /** @return the current position (zero based)
-        */
-       function getPosition();
-}
-
-/** @ingroup SPL
- * @brief Iterator that shows only parents
- *
- * A recursive iterator that only returns elements that themselves can be 
- * trversed.
- */
-class ParentIterator extends FilterIterator implements RecursiveIterator
-{
-       /** Construct an instance form a RecursiveIterator.
-        *
-        * @param $iterator inner iterator
-        */
-       function __construct(RecursiveIterator $iterator);
-}
-
-/** @ingroup SPL
- * @brief Caching iterator
- *
- * This Iterator allways reads one ahead. That allows it to know whether
- * more elements are available.
- */
-class CachingIterator implements Iterator
-{
-       /** Construct an instance form a RecursiveIterator.
-        *
-        * @param $iterator  inner iterator
-        * @param flags Bitmask: 
-        *              - CIT_CALL_TOSTRING  whether to call __toString() for 
-        *                     every element. This is optional since it is not 
-        *                     always used nad takes an additional fcall.
-        */
-       function __construct(Iterator $iterator, $flags = CIT_CALL_TOSTRING);
-
-       /** @return whether the inner iterator is valid. That is this iterator
-        * is valid and has one more element.
-        */
-       function valid();
-
-       /** @return The last value from the inner iterators __toString() or
-        * (string) conversion. The value is only fetched when the __constructor
-        * was called with $getStrVal = true.
-        */
-       function __tostring();
-       
-       /** @return the inner Iterator
-        */
-       function getInnerIterator();
-}
-
-/** @ingroup SPL
- * @brief The recursive version of the CachingIterator.
- */
-class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator
-{
-       /** Construct an instance form a RecursiveIterator.
-        *
-        * @param $iterator inner iterator
-        * @param $flags Bitmask: 
-        *              - CIT_CALL_TOSTRING  whether to call __toString() for 
-        *                     every element. This is optional since it is not 
-        *                     always used nad takes an additional fcall.
-        *              - CIT_CATCH_GET_CHILD whether to catch exceptions when 
-        *                     trying to get childs) 
-        */
-       function __construct(RecursiveIterator $iterator, $flags = CIT_CALL_TOSTRING);
-}
-
-/** @ingroup SPL
  * @brief Directory iterator
  */
 class DirectoryIterator implements Iterator
http://cvs.php.net/diff.php/php-src/ext/spl/internal/cachingrecursiveiterator.inc?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/spl/internal/cachingrecursiveiterator.inc
diff -u php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.3 
php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.4
--- php-src/ext/spl/internal/cachingrecursiveiterator.inc:1.3   Sun Oct 31 14:05:36 
2004
+++ php-src/ext/spl/internal/cachingrecursiveiterator.inc       Mon Nov  1 13:11:39 
2004
@@ -14,7 +14,7 @@
  * @author  Marcus Boerger
  * @version 1.1
  *
- * @See CachingIterator
+ * @see CachingIterator
  */
 class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator
 {
http://cvs.php.net/diff.php/php-src/ext/spl/internal/filteriterator.inc?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/spl/internal/filteriterator.inc
diff -u php-src/ext/spl/internal/filteriterator.inc:1.4 
php-src/ext/spl/internal/filteriterator.inc:1.5
--- php-src/ext/spl/internal/filteriterator.inc:1.4     Sun Oct 31 14:05:36 2004
+++ php-src/ext/spl/internal/filteriterator.inc Mon Nov  1 13:11:39 2004
@@ -17,6 +17,10 @@
  * Instances of this class act as a filter around iterators. In other words 
  * you can put an iterator into the constructor and the instance will only 
  * return selected (accepted) elements.
+ *
+ * The only thing that needs to be done to make this work is implementing 
+ * method accept(). Typically this invloves reading the current element or 
+ * key of the inner Iterator and checking whether it is acceptable.
  */
 abstract class FilterIterator implements OuterIterator
 {
http://cvs.php.net/diff.php/php-src/ext/spl/internal/limititerator.inc?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/spl/internal/limititerator.inc
diff -u php-src/ext/spl/internal/limititerator.inc:1.4 
php-src/ext/spl/internal/limititerator.inc:1.5
--- php-src/ext/spl/internal/limititerator.inc:1.4      Sun Oct 31 14:05:36 2004
+++ php-src/ext/spl/internal/limititerator.inc  Mon Nov  1 13:11:39 2004
@@ -14,6 +14,11 @@
  * @author  Marcus Boerger
  * @version 1.1
  *
+ * A class that starts iteration at a certain offset and only iterates over
+ * a specified amount of elements.
+ *
+ * This class uses SeekableIterator::seek() if available and rewind() plus
+ * a skip loop otehrwise.
  */
 class LimitIterator implements OuterIterator
 {
http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiterator.inc?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/spl/internal/recursiveiterator.inc
diff -u php-src/ext/spl/internal/recursiveiterator.inc:1.3 
php-src/ext/spl/internal/recursiveiterator.inc:1.4
--- php-src/ext/spl/internal/recursiveiterator.inc:1.3  Sun Oct 31 14:05:37 2004
+++ php-src/ext/spl/internal/recursiveiterator.inc      Mon Nov  1 13:11:39 2004
@@ -21,6 +21,7 @@
        function hasChildren();
        
        /** @return the sub iterator for the current element
+        * @note The returned object must implement RecursiveIterator.
         */
        function getChildren();
 }
http://cvs.php.net/diff.php/php-src/ext/spl/internal/recursiveiteratoriterator.inc?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/spl/internal/recursiveiteratoriterator.inc
diff -u php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.4 
php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.5
--- php-src/ext/spl/internal/recursiveiteratoriterator.inc:1.4  Sun Oct 31 14:05:37 
2004
+++ php-src/ext/spl/internal/recursiveiteratoriterator.inc      Mon Nov  1 13:11:39 
2004
@@ -18,6 +18,9 @@
  * @author  Marcus Boerger
  * @version 1.1
  *
+ * The objects of this class are created by instances of RecursiveIterator. 
+ * Elements of those iterators may be traversable themselves. If so these 
+ * sub elements are recursed into.
  */
 class RecursiveIteratorIterator implements OuterIterator
 {
@@ -63,7 +66,7 @@
                return false;
        }
        
-       /** @reutrn current key
+       /** @return current key
         */
        function key()
        {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to