Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class ArrayReplaceRecursiveTransformer extends TransformerAbstract |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $default; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $override; |
||
29 | |||
30 | /** |
||
31 | * @param array $default An array of the default field values to use, if any |
||
32 | * @param array $override An array of the field to always set to the same value, if any |
||
33 | * |
||
34 | * @throws NodalFlowException |
||
35 | */ |
||
36 | public function __construct(array $default, array $override = []) |
||
37 | { |
||
38 | $this->default = $default; |
||
39 | $this->override = $override; |
||
40 | parent::__construct(); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Set defaults and/or overrides recursively in the record |
||
45 | * |
||
46 | * @param array $record |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | public function exec($record = null) |
||
53 | } |
||
54 | } |
||
55 |