| @@ 1456-1465 (lines=10) @@ | ||
| 1453 | * |
|
| 1454 | * @return Arrayy (Immutable) |
|
| 1455 | */ |
|
| 1456 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1457 | { |
|
| 1458 | if (true === $recursive) { |
|
| 1459 | $result = array_replace_recursive($this->array, $array); |
|
| 1460 | } else { |
|
| 1461 | $result = array_replace($this->array, $array); |
|
| 1462 | } |
|
| 1463 | ||
| 1464 | return static::create($result); |
|
| 1465 | } |
|
| 1466 | ||
| 1467 | /** |
|
| 1468 | * Merge the new $array into the current array. |
|
| @@ 1478-1487 (lines=10) @@ | ||
| 1475 | * |
|
| 1476 | * @return Arrayy (Immutable) |
|
| 1477 | */ |
|
| 1478 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1479 | { |
|
| 1480 | if (true === $recursive) { |
|
| 1481 | $result = array_merge_recursive($this->array, $array); |
|
| 1482 | } else { |
|
| 1483 | $result = array_merge($this->array, $array); |
|
| 1484 | } |
|
| 1485 | ||
| 1486 | return static::create($result); |
|
| 1487 | } |
|
| 1488 | ||
| 1489 | /** |
|
| 1490 | * Merge the the current array into the $array. |
|
| @@ 1499-1508 (lines=10) @@ | ||
| 1496 | * |
|
| 1497 | * @return Arrayy (Immutable) |
|
| 1498 | */ |
|
| 1499 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1500 | { |
|
| 1501 | if (true === $recursive) { |
|
| 1502 | $result = array_replace_recursive($array, $this->array); |
|
| 1503 | } else { |
|
| 1504 | $result = array_replace($array, $this->array); |
|
| 1505 | } |
|
| 1506 | ||
| 1507 | return static::create($result); |
|
| 1508 | } |
|
| 1509 | ||
| 1510 | /** |
|
| 1511 | * Merge the current array into the new $array. |
|
| @@ 1521-1530 (lines=10) @@ | ||
| 1518 | * |
|
| 1519 | * @return Arrayy (Immutable) |
|
| 1520 | */ |
|
| 1521 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1522 | { |
|
| 1523 | if (true === $recursive) { |
|
| 1524 | $result = array_merge_recursive($array, $this->array); |
|
| 1525 | } else { |
|
| 1526 | $result = array_merge($array, $this->array); |
|
| 1527 | } |
|
| 1528 | ||
| 1529 | return static::create($result); |
|
| 1530 | } |
|
| 1531 | ||
| 1532 | /** |
|
| 1533 | * Get the min value from an array. |
|