1 | <?php |
||
24 | class MapIterator extends IteratorIterator |
||
25 | { |
||
26 | /** |
||
27 | * The callback to apply on all InnerIterator current value. |
||
28 | * |
||
29 | * @var callable |
||
30 | */ |
||
31 | protected $callable; |
||
32 | |||
33 | /** |
||
34 | * New instance. |
||
35 | */ |
||
36 | 27 | public function __construct(Traversable $iterator, callable $callable) |
|
41 | |||
42 | /** |
||
43 | * @return mixed The value of the current element. |
||
44 | */ |
||
45 | 15 | public function current() |
|
49 | } |
||
50 |