Lines Matching refs:Iterator

19 # Hoa\Iterator
23 …ocumentation-hack_book-ff0066.svg)](https://central.hoa-project.net/Documentation/Library/Iterator)
30 [Learn more](https://central.hoa-project.net/Documentation/Library/Iterator).
68 `Hoa\Iterator\Iterator` defines the basis of an iterator. It extends
69 [`Iterator`](http://php.net/class.iterator).
73 `Hoa\Iterator\Aggregate` allows a class to use an external iterator through the
79 `Hoa\Iterator\IteratorIterator` transforms anything that is
83 ### Iterator of iterators
85 `Hoa\Iterator\Outer` represents an iterator that iterates over iterators. It
90 `Hoa\Iterator\Mock` represents an empty iterator. It extends
95 `Hoa\Iterator\Seekable` represents an iterator that can be seeked. It extends
100 `Hoa\Iterator\Map` allows to iterate an array. It extends
104 $foobar = new Hoa\Iterator\Map(['f', 'o', 'o', 'b', 'a', 'r']);
118 `Hoa\Iterator\Filter` and `Hoa\Iterator\CallbackFilter` allows to filter the
124 $filter = new Hoa\Iterator\CallbackFilter(
141 Also, `Hoa\Iterator\RegularExpression` allows to filter based on a regular
146 `Hoa\Iterator\Limit` allows to iterate *n* elements of an iterator starting from
150 $limit = new Hoa\Iterator\Limit($foobar, 2, 3);
164 `Hoa\Iterator\Infinite` allows to iterate over and over again the same iterator.
168 $infinite = new Hoa\Iterator\Infinite($foobar);
169 $limit = new Hoa\Iterator\Limit($infinite, 0, 21);
181 Also, `Hoa\Iterator\NoRewind` is an iterator that does not rewind. It extends
186 `Hoa\Iterator\Repeater` allows to repeat an iterator *n* times.
189 $repeater = new Hoa\Iterator\Repeater(
211 `Hoa\Iterator\Counter` is equivalent to a `for($i = $from, $i < $to, $i +=
215 $counter = new Hoa\Iterator\Counter(0, 12, 3);
229 `Hoa\Iterator\Append` allows to iterate over iterators one after another. It
233 $counter1 = new Hoa\Iterator\Counter(0, 12, 3);
234 $counter2 = new Hoa\Iterator\Counter(13, 23, 2);
235 $append = new Hoa\Iterator\Append();
251 `Hoa\Iterator\Multiple` allows to iterate over several iterator at the same
255 $foobar = new Hoa\Iterator\Map(['f', 'o', 'o', 'b', 'a', 'r']);
256 $baz = new Hoa\Iterator\Map(['b', 'a', 'z']);
257 $multiple = new Hoa\Iterator\Multiple(
258 Hoa\Iterator\Multiple::MIT_NEED_ANY
259 | Hoa\Iterator\Multiple::MIT_KEYS_ASSOC
281 `Hoa\Iterator\Demultiplexer` demuxes result from another iterator. This iterator
282 is somehow the opposite of the `Hoa\Iterator\Multiple` iterator.
285 $counter = new Hoa\Iterator\Counter(0, 10, 1);
286 $multiple = new Hoa\Iterator\Multiple();
289 $demultiplexer = new Hoa\Iterator\Demultiplexer(
308 `Hoa\Iterator\Directory` and `Hoa\Iterator\FileSystem` allow to iterate the file
309 system where files are represented by instances of `Hoa\Iterator\SplFileInfo`.
316 $directory = new Hoa\Iterator\Directory(resolve('hoa://Library/Iterator'));
337 Also, the `Hoa\Iterator\Glob` allows to iterator with the glob strategy. It
341 $glob = new Hoa\Iterator\Glob(resolve('hoa://Library/Iterator') . '/M*.php');
357 `Hoa\Iterator\Lookahead` allows to look ahead for the next element:
360 $counter = new Hoa\Iterator\Counter(0, 5, 1);
361 $lookahead = new Hoa\Iterator\Lookahead($counter);
383 The `Hoa\Iterator\Lookbehind` also exists and allows to look behind for the
388 `Hoa\Iterator\Buffer` allows to move forward as usual but also backward up to a
392 $abcde = new Hoa\Iterator\Map(['a', 'b', 'c', 'd', 'e']);
393 $buffer = new Hoa\Iterator\Buffer($abcde, 3);
421 `Hoa\Iterator\CallbackGenerator` allows to transform any callable into an
423 with `Hoa\Iterator\Limit`:
426 $generator = new Hoa\Iterator\CallbackGenerator(function ($key) {
429 $limit = new Hoa\Iterator\Limit($generator, 0, 10);
444 most important interface is `Hoa\Iterator\Recursive\Recursive` (it extends
448 * `Hoa\Iterator\Recursive\CallbackFilter` (it extends
450 * `Hoa\Iterator\Recursive\Directory` (it extends
452 * `Hoa\Iterator\Recursive\Filter` (it extends
454 * `Hoa\Iterator\Recursive\Iterator` (it extends
456 * `Hoa\Iterator\Recursive\Map` (it extends
458 * `Hoa\Iterator\Recursive\Mock`,
459 * `Hoa\Iterator\Recursive\RegularExpression`
465 [hack book of `Hoa\Iterator`](https://central.hoa-project.net/Documentation/Library/Iterator) conta…