| 1 | <?php |
||
| 30 | abstract class CallbackTransformation extends Transformation |
||
| 31 | { |
||
| 32 | /** |
||
| 33 | * @construct required |
||
| 34 | */ |
||
| 35 | protected $transform; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Constructs the CallbackTransformation with the iterable original |
||
| 39 | * data and a callback |
||
| 40 | */ |
||
| 41 | 1 | public function __construct(iterable $iterator, callable $cb) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Calls the callback with the current value and key, returning its |
||
| 50 | * return value unmodified |
||
| 51 | * |
||
| 52 | * @return mixed |
||
| 53 | */ |
||
| 54 | 1 | protected function call() |
|
| 59 | } |
||
| 60 |