| @@ 2599-2608 (lines=10) @@ | ||
| 2596 | * @return static |
|
| 2597 | * <p>(Immutable)</p> |
|
| 2598 | */ |
|
| 2599 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2600 | { |
|
| 2601 | if ($recursive === true) { |
|
| 2602 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2603 | } else { |
|
| 2604 | $result = \array_replace($this->getArray(), $array); |
|
| 2605 | } |
|
| 2606 | ||
| 2607 | return static::create( |
|
| 2608 | $result, |
|
| 2609 | $this->iteratorClass, |
|
| 2610 | false |
|
| 2611 | ); |
|
| @@ 2626-2635 (lines=10) @@ | ||
| 2623 | * @return static |
|
| 2624 | * <p>(Immutable)</p> |
|
| 2625 | */ |
|
| 2626 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2627 | { |
|
| 2628 | if ($recursive === true) { |
|
| 2629 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2630 | } else { |
|
| 2631 | $result = \array_merge($this->getArray(), $array); |
|
| 2632 | } |
|
| 2633 | ||
| 2634 | return static::create( |
|
| 2635 | $result, |
|
| 2636 | $this->iteratorClass, |
|
| 2637 | false |
|
| 2638 | ); |
|
| @@ 2652-2661 (lines=10) @@ | ||
| 2649 | * @return static |
|
| 2650 | * <p>(Immutable)</p> |
|
| 2651 | */ |
|
| 2652 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2653 | { |
|
| 2654 | if ($recursive === true) { |
|
| 2655 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2656 | } else { |
|
| 2657 | $result = \array_replace($array, $this->getArray()); |
|
| 2658 | } |
|
| 2659 | ||
| 2660 | return static::create( |
|
| 2661 | $result, |
|
| 2662 | $this->iteratorClass, |
|
| 2663 | false |
|
| 2664 | ); |
|
| @@ 2679-2688 (lines=10) @@ | ||
| 2676 | * @return static |
|
| 2677 | * <p>(Immutable)</p> |
|
| 2678 | */ |
|
| 2679 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2680 | { |
|
| 2681 | if ($recursive === true) { |
|
| 2682 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2683 | } else { |
|
| 2684 | $result = \array_merge($array, $this->getArray()); |
|
| 2685 | } |
|
| 2686 | ||
| 2687 | return static::create( |
|
| 2688 | $result, |
|
| 2689 | $this->iteratorClass, |
|
| 2690 | false |
|
| 2691 | ); |
|