| @@ 1413-1422 (lines=10) @@ | ||
| 1410 | * |
|
| 1411 | * @return Arrayy (Immutable) |
|
| 1412 | */ |
|
| 1413 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1414 | { |
|
| 1415 | if (true === $recursive) { |
|
| 1416 | $result = array_replace_recursive($this->array, $array); |
|
| 1417 | } else { |
|
| 1418 | $result = array_replace($this->array, $array); |
|
| 1419 | } |
|
| 1420 | ||
| 1421 | return static::create($result); |
|
| 1422 | } |
|
| 1423 | ||
| 1424 | /** |
|
| 1425 | * Merge the new $array into the current array. |
|
| @@ 1435-1444 (lines=10) @@ | ||
| 1432 | * |
|
| 1433 | * @return Arrayy (Immutable) |
|
| 1434 | */ |
|
| 1435 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1436 | { |
|
| 1437 | if (true === $recursive) { |
|
| 1438 | $result = array_merge_recursive($this->array, $array); |
|
| 1439 | } else { |
|
| 1440 | $result = array_merge($this->array, $array); |
|
| 1441 | } |
|
| 1442 | ||
| 1443 | return static::create($result); |
|
| 1444 | } |
|
| 1445 | ||
| 1446 | /** |
|
| 1447 | * Merge the the current array into the $array. |
|
| @@ 1456-1465 (lines=10) @@ | ||
| 1453 | * |
|
| 1454 | * @return Arrayy (Immutable) |
|
| 1455 | */ |
|
| 1456 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1457 | { |
|
| 1458 | if (true === $recursive) { |
|
| 1459 | $result = array_replace_recursive($array, $this->array); |
|
| 1460 | } else { |
|
| 1461 | $result = array_replace($array, $this->array); |
|
| 1462 | } |
|
| 1463 | ||
| 1464 | return static::create($result); |
|
| 1465 | } |
|
| 1466 | ||
| 1467 | /** |
|
| 1468 | * Merge the current array into the new $array. |
|
| @@ 1478-1487 (lines=10) @@ | ||
| 1475 | * |
|
| 1476 | * @return Arrayy (Immutable) |
|
| 1477 | */ |
|
| 1478 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1479 | { |
|
| 1480 | if (true === $recursive) { |
|
| 1481 | $result = array_merge_recursive($array, $this->array); |
|
| 1482 | } else { |
|
| 1483 | $result = array_merge($array, $this->array); |
|
| 1484 | } |
|
| 1485 | ||
| 1486 | return static::create($result); |
|
| 1487 | } |
|
| 1488 | ||
| 1489 | /** |
|
| 1490 | * Get the min value from an array. |
|