|
@@ 144-146 (lines=3) @@
|
| 141 |
|
{ |
| 142 |
|
if (is_array($name)) { |
| 143 |
|
foreach ($name as $key => $val) { |
| 144 |
|
if (isset($this->data[$key]) && !is_array($this->data[$key])) { |
| 145 |
|
settype($this->data[$key], 'array'); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
if ($merge === true && is_array($val)) { |
| 149 |
|
$this->data[$key] = $val + $this->data[$key]; |
|
@@ 179-181 (lines=3) @@
|
| 176 |
|
*/ |
| 177 |
|
public function appendByRef($name, &$val, $merge = false) |
| 178 |
|
{ |
| 179 |
|
if (isset($this->data[$name]) && !is_array($this->data[$name])) { |
| 180 |
|
settype($this->data[$name], 'array'); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
if ($merge === true && is_array($val)) { |
| 184 |
|
foreach ($val as $key => &$value) { |