@@ 64-70 (lines=7) @@ | ||
61 | $config = array($this->prefix => $config); |
|
62 | } |
|
63 | ||
64 | foreach ($config as $name => $value) { |
|
65 | if (isset($app[$name]) && is_array($value)) { |
|
66 | $app[$name] = $this->mergeRecursively($app[$name], $value); |
|
67 | } else { |
|
68 | $app[$name] = $this->doReplacements($value); |
|
69 | } |
|
70 | } |
|
71 | } |
|
72 | ||
73 | private function mergeRecursively(array $currentValue, array $newValue) |
|
@@ 75-81 (lines=7) @@ | ||
72 | ||
73 | private function mergeRecursively(array $currentValue, array $newValue) |
|
74 | { |
|
75 | foreach ($newValue as $name => $value) { |
|
76 | if (is_array($value) && isset($currentValue[$name])) { |
|
77 | $currentValue[$name] = $this->mergeRecursively($currentValue[$name], $value); |
|
78 | } else { |
|
79 | $currentValue[$name] = $this->doReplacements($value); |
|
80 | } |
|
81 | } |
|
82 | ||
83 | return $currentValue; |
|
84 | } |