| @@ 1418-1427 (lines=10) @@ | ||
| 1415 | * |
|
| 1416 | * @return Arrayy (Immutable) |
|
| 1417 | */ |
|
| 1418 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1419 | { |
|
| 1420 | if (true === $recursive) { |
|
| 1421 | $result = array_replace_recursive($this->array, $array); |
|
| 1422 | } else { |
|
| 1423 | $result = array_replace($this->array, $array); |
|
| 1424 | } |
|
| 1425 | ||
| 1426 | return static::create($result); |
|
| 1427 | } |
|
| 1428 | ||
| 1429 | /** |
|
| 1430 | * Merge the new $array into the current array. |
|
| @@ 1440-1449 (lines=10) @@ | ||
| 1437 | * |
|
| 1438 | * @return Arrayy (Immutable) |
|
| 1439 | */ |
|
| 1440 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1441 | { |
|
| 1442 | if (true === $recursive) { |
|
| 1443 | $result = array_merge_recursive($this->array, $array); |
|
| 1444 | } else { |
|
| 1445 | $result = array_merge($this->array, $array); |
|
| 1446 | } |
|
| 1447 | ||
| 1448 | return static::create($result); |
|
| 1449 | } |
|
| 1450 | ||
| 1451 | /** |
|
| 1452 | * Merge the the current array into the $array. |
|
| @@ 1461-1470 (lines=10) @@ | ||
| 1458 | * |
|
| 1459 | * @return Arrayy (Immutable) |
|
| 1460 | */ |
|
| 1461 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1462 | { |
|
| 1463 | if (true === $recursive) { |
|
| 1464 | $result = array_replace_recursive($array, $this->array); |
|
| 1465 | } else { |
|
| 1466 | $result = array_replace($array, $this->array); |
|
| 1467 | } |
|
| 1468 | ||
| 1469 | return static::create($result); |
|
| 1470 | } |
|
| 1471 | ||
| 1472 | /** |
|
| 1473 | * Merge the current array into the new $array. |
|
| @@ 1483-1492 (lines=10) @@ | ||
| 1480 | * |
|
| 1481 | * @return Arrayy (Immutable) |
|
| 1482 | */ |
|
| 1483 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1484 | { |
|
| 1485 | if (true === $recursive) { |
|
| 1486 | $result = array_merge_recursive($array, $this->array); |
|
| 1487 | } else { |
|
| 1488 | $result = array_merge($array, $this->array); |
|
| 1489 | } |
|
| 1490 | ||
| 1491 | return static::create($result); |
|
| 1492 | } |
|
| 1493 | ||
| 1494 | /** |
|
| 1495 | * Get the min value from an array. |
|