Skip to content

Commit 081dac3

Browse files
committed
- Update docu
1 parent a872cb0 commit 081dac3

10 files changed

+55
-11
lines changed

ext/spl/internal/cachingiterator.inc

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file cachingiterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class CachingIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004
@@ -13,10 +13,19 @@ define('CIT_CALL_TOSTRING', 1);
1313
define('CIT_CATCH_GET_CHILD', 2);
1414

1515
/**
16-
* @brief Cached Iteration over another Iterator
16+
* @brief Cached iteration over another Iterator
1717
* @author Marcus Boerger
1818
* @version 1.1
1919
*
20+
* This iterator wrapper does a one ahead iteration. This way it knows whether
21+
* the inner iterator has one more element.
22+
*
23+
* @note If you want to convert the elements into strings and the inner
24+
* Iterator is an internal Iterator then you need to provide the
25+
* flag CIT_CALL_TOSTRING to do the conversion when the actual element
26+
* is being fetched. Otherwise the conversion would happen with the
27+
* already changed iterator. If you do not need this then it you should
28+
* omit this flag because it costs unneccessary work and time.
2029
*/
2130
class CachingIterator implements OuterIterator
2231
{
@@ -98,6 +107,9 @@ class CachingIterator implements OuterIterator
98107
}
99108

100109
/** Aggregate the inner iterator
110+
*
111+
* @param func Name of method to invoke
112+
* @param params Array of parameters to pass to method
101113
*/
102114
function __call($func, $params)
103115
{

ext/spl/internal/cachingrecursiveiterator.inc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file cachingrecursiveiterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class CachingRecursiveIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004
@@ -10,9 +10,11 @@
1010
*/
1111

1212
/**
13-
* @brief
13+
* @brief Cached recursive iteration over another Iterator
1414
* @author Marcus Boerger
1515
* @version 1.1
16+
*
17+
* @See CachingIterator
1618
*/
1719
class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator
1820
{

ext/spl/internal/filteriterator.inc

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file filteriterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class FilterIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004
@@ -109,6 +109,16 @@ abstract class FilterIterator implements OuterIterator
109109
{
110110
return $this->it;
111111
}
112+
113+
/** Aggregate the inner iterator
114+
*
115+
* @param func Name of method to invoke
116+
* @param params Array of parameters to pass to method
117+
*/
118+
function __call($func, $params)
119+
{
120+
return call_user_func_array(array($this->it, $func), $params);
121+
}
112122
}
113123

114124
?>

ext/spl/internal/iteratoriterator.inc

+10
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ class IteratorIterator implements OuterIterator
7777
return $this->iterator->rewind();
7878
}
7979

80+
/** Aggregate the inner iterator
81+
*
82+
* @param func Name of method to invoke
83+
* @param params Array of parameters to pass to method
84+
*/
85+
function __call($func, $params)
86+
{
87+
return call_user_func_array(array($this->it, $func), $params);
88+
}
89+
8090
/** The inner iterator must be private because when this class will be
8191
* converted to c code it won't no longer be available.
8292
*/

ext/spl/internal/limititerator.inc

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file limititerator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class LimitIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004
@@ -113,6 +113,16 @@ class LimitIterator implements OuterIterator
113113
{
114114
return $this->it;
115115
}
116+
117+
/** Aggregate the inner iterator
118+
*
119+
* @param func Name of method to invoke
120+
* @param params Array of parameters to pass to method
121+
*/
122+
function __call($func, $params)
123+
{
124+
return call_user_func_array(array($this->it, $func), $params);
125+
}
116126
}
117127

118128
?>

ext/spl/internal/outeriterator.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file outeriterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class OuterIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004

ext/spl/internal/parentiterator.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file parentiterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class FilterIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004

ext/spl/internal/recursiveiterator.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file recursiveiterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class RecursiveIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004

ext/spl/internal/recursiveiteratoriterator.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file recursiveiteratoriterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class RecursiveIteratorIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004

ext/spl/internal/seekableiterator.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/** @file seekableiterator.inc
4-
* @ingroup Internal
4+
* @ingroup SPL
55
* @brief class SeekableIterator
66
* @author Marcus Boerger
77
* @date 2003 - 2004

0 commit comments

Comments
 (0)