| 1 | <?php |
||
| 17 | class KeyRenameTransformer extends TransformerAbstract |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * array[inputKeyName] = 'outputKeyName' |
||
| 21 | * |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | protected $aliases; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param array $aliases |
||
| 28 | */ |
||
| 29 | public function __construct(array $aliases) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Replace keys in array |
||
| 36 | * This method does not preserve incoming order |
||
| 37 | * |
||
| 38 | * @param mixed $record |
||
| 39 | * |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | public function exec($record) |
||
| 53 | } |
||
| 54 |