| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class KeyRenameTransformer extends TransformerAbstract |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * array[inputKeyName] = 'outputKeyName' |
||
| 22 | * |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $aliases; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param array $aliases |
||
| 29 | * |
||
| 30 | * @throws NodalFlowException |
||
| 31 | */ |
||
| 32 | public function __construct(array $aliases) |
||
| 33 | { |
||
| 34 | $this->aliases = $aliases; |
||
| 35 | parent::__construct(); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Replace keys in array |
||
| 40 | * This method does not preserve incoming order |
||
| 41 | * |
||
| 42 | * @param array $record |
||
| 43 | * |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | public function exec($record = null) |
||
| 56 | } |
||
| 57 | } |
||
| 58 |