| 1 | <?php |
||
| 26 | class MapIterator extends IteratorIterator |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * The function to be apply on all InnerIterator element |
||
| 30 | * |
||
| 31 | * @var callable |
||
| 32 | */ |
||
| 33 | private $callable; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The Constructor |
||
| 37 | * |
||
| 38 | * @param Iterator $iterator |
||
| 39 | * @param callable $callable |
||
| 40 | */ |
||
| 41 | public function __construct(Iterator $iterator, callable $callable) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get the value of the current element |
||
| 49 | */ |
||
| 50 | public function current() |
||
| 56 | } |
||
| 57 |