| 1 | <?php |
||
| 17 | class ArrayMapTransformer extends TransformerAbstract |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Any callable with one argument which returns something |
||
| 21 | * |
||
| 22 | * @var callable |
||
| 23 | */ |
||
| 24 | protected $maper; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param callable $maper |
||
| 28 | */ |
||
| 29 | public function __construct(callable $maper) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Execute the array_map call |
||
| 36 | * |
||
| 37 | * @param mixed $record |
||
| 38 | * |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function exec($record) |
||
| 45 | } |
||
| 46 |