1 | <?php |
||
11 | class UniqueIterator extends \FilterIterator implements FiniteIterableInterface |
||
12 | { |
||
13 | use FiniteIterableTrait; |
||
14 | |||
15 | /** @var \Closure */ |
||
16 | private $func; |
||
17 | |||
18 | /** @var array */ |
||
19 | private $seen; |
||
20 | |||
21 | /** |
||
22 | * @param \Closure $func |
||
23 | * @param \Iterator $iterable |
||
24 | */ |
||
25 | 15 | public function __construct(\Closure $func, \Iterator $iterable) |
|
31 | |||
32 | /** |
||
33 | * {@inheritDoc} |
||
34 | */ |
||
35 | 11 | public function accept() |
|
45 | |||
46 | /** |
||
47 | * {@inheritDoc} |
||
48 | */ |
||
49 | 13 | public function rewind() |
|
54 | } |
||
55 |