1 | <?php |
||
22 | class CountIterator implements \Iterator |
||
23 | { |
||
24 | // Fluent interface traits |
||
25 | use AllTrait; |
||
26 | use AnyTrait; |
||
27 | use ChainTrait; |
||
28 | use CycleTrait; |
||
29 | use FilterTrait; |
||
30 | use FirstTrait; |
||
31 | use GroupByTrait; |
||
32 | use LastTrait; |
||
33 | use MapByTrait; |
||
34 | use MapTrait; |
||
35 | use ReduceTrait; |
||
36 | use ReversedTrait; |
||
37 | use SliceTrait; |
||
38 | use SortedTrait; |
||
39 | use UniqueTrait; |
||
40 | use ZipTrait; |
||
41 | |||
42 | protected $start; |
||
43 | protected $step; |
||
44 | protected $key; |
||
45 | |||
46 | 30 | public function __construct($start, $step) |
|
52 | |||
53 | 30 | public function rewind() |
|
57 | |||
58 | 30 | public function current() |
|
62 | |||
63 | 30 | public function key() |
|
67 | |||
68 | 30 | public function next() |
|
72 | |||
73 | 30 | public function valid() |
|
77 | |||
78 | /** |
||
79 | * This method is called by var_dump() when dumping an object to get the properties that should be shown. |
||
80 | * |
||
81 | * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo |
||
82 | * @return array |
||
83 | */ |
||
84 | public function __debugInfo() |
||
91 | } |
||
92 |