| @@ 1168-1177 (lines=10) @@ | ||
| 1165 | * |
|
| 1166 | * @return Arrayy |
|
| 1167 | */ |
|
| 1168 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1169 | { |
|
| 1170 | if (true === $recursive) { |
|
| 1171 | $result = array_replace_recursive($this->array, $array); |
|
| 1172 | } else { |
|
| 1173 | $result = array_replace($this->array, $array); |
|
| 1174 | } |
|
| 1175 | ||
| 1176 | return static::create($result); |
|
| 1177 | } |
|
| 1178 | ||
| 1179 | /** |
|
| 1180 | * alias: for "Arrayy->searchIndex()" |
|
| @@ 1343-1352 (lines=10) @@ | ||
| 1340 | * |
|
| 1341 | * @return Arrayy |
|
| 1342 | */ |
|
| 1343 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1344 | { |
|
| 1345 | if (true === $recursive) { |
|
| 1346 | $result = array_merge_recursive($this->array, $array); |
|
| 1347 | } else { |
|
| 1348 | $result = array_merge($this->array, $array); |
|
| 1349 | } |
|
| 1350 | ||
| 1351 | return static::create($result); |
|
| 1352 | } |
|
| 1353 | ||
| 1354 | /** |
|
| 1355 | * Merge the current array into the new $array. |
|
| @@ 1365-1374 (lines=10) @@ | ||
| 1362 | * |
|
| 1363 | * @return Arrayy |
|
| 1364 | */ |
|
| 1365 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1366 | { |
|
| 1367 | if (true === $recursive) { |
|
| 1368 | $result = array_merge_recursive($array, $this->array); |
|
| 1369 | } else { |
|
| 1370 | $result = array_merge($array, $this->array); |
|
| 1371 | } |
|
| 1372 | ||
| 1373 | return static::create($result); |
|
| 1374 | } |
|
| 1375 | ||
| 1376 | /** |
|
| 1377 | * Merge the the current array into the $array. |
|
| @@ 1386-1395 (lines=10) @@ | ||
| 1383 | * |
|
| 1384 | * @return Arrayy |
|
| 1385 | */ |
|
| 1386 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1387 | { |
|
| 1388 | if (true === $recursive) { |
|
| 1389 | $result = array_replace_recursive($array, $this->array); |
|
| 1390 | } else { |
|
| 1391 | $result = array_replace($array, $this->array); |
|
| 1392 | } |
|
| 1393 | ||
| 1394 | return static::create($result); |
|
| 1395 | } |
|
| 1396 | ||
| 1397 | /** |
|
| 1398 | * Return values that are only in the current array. |
|