1 | <?php |
||
17 | class RepeatIterator implements \Countable, InfiniteIterableInterface |
||
18 | { |
||
19 | use InfiniteIterableTrait; |
||
20 | |||
21 | /** @var mixed */ |
||
22 | private $mixed; |
||
23 | |||
24 | /** @var integer */ |
||
25 | private $times; |
||
26 | |||
27 | /** @var integer */ |
||
28 | private $key; |
||
29 | |||
30 | /** |
||
31 | * RepeatIterator constructor. |
||
32 | * |
||
33 | * @param mixed $mixed |
||
34 | * @param integer $times |
||
35 | */ |
||
36 | 5 | public function __construct($mixed, $times) |
|
42 | |||
43 | /** |
||
44 | * @{inheritDoc} |
||
45 | */ |
||
46 | 5 | public function rewind() |
|
50 | |||
51 | /** |
||
52 | * @{inheritDoc} |
||
53 | */ |
||
54 | 4 | public function current() |
|
58 | |||
59 | /** |
||
60 | * @{inheritDoc} |
||
61 | */ |
||
62 | 4 | public function key() |
|
66 | |||
67 | /** |
||
68 | * @{inheritDoc} |
||
69 | */ |
||
70 | 4 | public function next() |
|
74 | |||
75 | /** |
||
76 | * @{inheritDoc} |
||
77 | */ |
||
78 | 5 | public function valid() |
|
82 | |||
83 | /** |
||
84 | * @{inheritDoc} |
||
85 | */ |
||
86 | 5 | public function count() |
|
90 | } |
||
91 |