1 | <?php declare(strict_types = 1); |
||
15 | class RepositoryIterator implements \Iterator |
||
16 | { |
||
17 | /** |
||
18 | * @var Repository |
||
19 | */ |
||
20 | private $repository; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | private $position = 0; |
||
26 | |||
27 | /** |
||
28 | * @param Repository $repository |
||
29 | */ |
||
30 | public function __construct(Repository $repository) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function rewind() |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function current() |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function key() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function next() |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function valid(): bool |
||
74 | } |
||
75 |