Skip to content

Commit 3f207e6

Browse files
committed
Create a documentation package for Iterators
1 parent 5aab170 commit 3f207e6

5 files changed

+33
-5
lines changed

CallbackTransformIterator.php

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* Class CallbackTransformIterator implements an Iterator that transforms
44
* the values of another Iterator through a callback provided from the
55
* outside.
6+
*
7+
* @author Beat Vontobel
8+
* @since 2011-11-22
9+
* @package MeteoNews\phplib
10+
* @subpackage Iterators
611
*/
712

813
class CallbackTransformIterator extends IteratorIterator

CartesianProductIterator.php

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@
33
* Class CartesianProductIterator implements an Iterator that iterates over two
44
* Iterators, returning all the values of the second Iterator for every value
55
* of the first Iterator, aka performing a cartesian product or a CROSS JOIN as
6-
* it would be called in SQL. Each joined value of the product is returned as
7-
* an array of the two values like this:
6+
* it would be called in SQL.
87
*
9-
* array(valueFrom1stIterator, valueFrom2ndIterator)
8+
* Each joined value of the product is returned as an array of the two
9+
* values like this:
10+
*
11+
* <code>
12+
* array(valueFrom1stIterator, valueFrom2ndIterator)
13+
* </code>
1014
*
1115
* The keys of the Iterators are discarded, this class will instead return a
1216
* sequential numeric key.
17+
*
18+
* @author Beat Vontobel
19+
* @since 2011-11-24
20+
* @package MeteoNews\phplib
21+
* @subpackage Iterators
1322
*/
1423

1524
class CartesianProductIterator extends IteratorIterator

SplitIterator.php

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<?php
22
require_once("SplitIterator/SplitInnerIterator.php");
33

4+
/**
5+
*
6+
* @author Beat Vontobel
7+
* @since 2015-05-20
8+
* @package MeteoNews\phplib
9+
* @subpackage Iterators
10+
*/
411
abstract class SplitIterator extends IteratorIterator {
512
abstract public function needsSplit($key, $value);
613

SplitIterator/SplitInnerIterator.php

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* iterator, and rewinding it would also mess with the state of the
99
* outer iterator).
1010
*
11+
* @author Beat Vontobel
12+
* @since 2015-05-20
13+
* @package MeteoNews\phplib
14+
* @subpackage Iterators
15+
*
1116
* @see SplitIterator
1217
*/
1318
class SplitInnerIterator extends NoRewindIterator {

traitIteratorCountableEmpty.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
* Just saves you some typing for Mock-Ups, test cases, or other
1616
* classes that will never contain anything.
1717
*
18-
* @author Beat Vontobel
19-
* @since 2015-04-01
18+
* @author Beat Vontobel
19+
* @since 2015-04-01
20+
* @package MeteoNews\phplib
21+
* @subpackage Iterators
2022
*/
2123
trait traitIteratorCountableEmpty {
2224
public function count() {

0 commit comments

Comments
 (0)