| @@ 1181-1190 (lines=10) @@ | ||
| 1178 | * |
|
| 1179 | * @return Arrayy |
|
| 1180 | */ |
|
| 1181 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1182 | { |
|
| 1183 | if (true === $recursive) { |
|
| 1184 | $result = array_replace_recursive($this->array, $array); |
|
| 1185 | } else { |
|
| 1186 | $result = array_replace($this->array, $array); |
|
| 1187 | } |
|
| 1188 | ||
| 1189 | return static::create($result); |
|
| 1190 | } |
|
| 1191 | ||
| 1192 | /** |
|
| 1193 | * alias: for "Arrayy->searchIndex()" |
|
| @@ 1333-1342 (lines=10) @@ | ||
| 1330 | * |
|
| 1331 | * @return Arrayy |
|
| 1332 | */ |
|
| 1333 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1334 | { |
|
| 1335 | if (true === $recursive) { |
|
| 1336 | $result = array_merge_recursive($this->array, $array); |
|
| 1337 | } else { |
|
| 1338 | $result = array_merge($this->array, $array); |
|
| 1339 | } |
|
| 1340 | ||
| 1341 | return static::create($result); |
|
| 1342 | } |
|
| 1343 | ||
| 1344 | /** |
|
| 1345 | * Merge the current array into the new $array. |
|
| @@ 1355-1364 (lines=10) @@ | ||
| 1352 | * |
|
| 1353 | * @return Arrayy |
|
| 1354 | */ |
|
| 1355 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1356 | { |
|
| 1357 | if (true === $recursive) { |
|
| 1358 | $result = array_merge_recursive($array, $this->array); |
|
| 1359 | } else { |
|
| 1360 | $result = array_merge($array, $this->array); |
|
| 1361 | } |
|
| 1362 | ||
| 1363 | return static::create($result); |
|
| 1364 | } |
|
| 1365 | ||
| 1366 | /** |
|
| 1367 | * Merge the the current array into the $array. |
|
| @@ 1376-1385 (lines=10) @@ | ||
| 1373 | * |
|
| 1374 | * @return Arrayy |
|
| 1375 | */ |
|
| 1376 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1377 | { |
|
| 1378 | if (true === $recursive) { |
|
| 1379 | $result = array_replace_recursive($array, $this->array); |
|
| 1380 | } else { |
|
| 1381 | $result = array_replace($array, $this->array); |
|
| 1382 | } |
|
| 1383 | ||
| 1384 | return static::create($result); |
|
| 1385 | } |
|
| 1386 | ||
| 1387 | /** |
|
| 1388 | * Return values that are only in the current array. |
|