1 | <?php |
||
7 | class ExpandNodeTransformer implements TransformerInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $field; |
||
13 | |||
14 | /** |
||
15 | * @var bool |
||
16 | */ |
||
17 | protected $removeOriginal; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $overwriteExisting; |
||
23 | |||
24 | /** |
||
25 | * @param string $field Expand nodes in this field |
||
26 | * @param bool $removeOriginal Whether to remove the original node |
||
27 | * @param array $overwriteExisting Keys that may be overwritten when they already exist |
||
28 | */ |
||
29 | 8 | public function __construct($field, $removeOriginal = false, array $overwriteExisting = []) |
|
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | 8 | public function transform(ParameterBag $item) |
|
55 | |||
56 | /** |
||
57 | * @param array $value |
||
58 | * @param ParameterBag $item |
||
59 | */ |
||
60 | 8 | protected function expand(array $value, ParameterBag $item) |
|
73 | } |
||
74 |