| @@ 2711-2720 (lines=10) @@ | ||
| 2708 | * @return static |
|
| 2709 | * <p>(Immutable)</p> |
|
| 2710 | */ |
|
| 2711 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2712 | { |
|
| 2713 | if ($recursive === true) { |
|
| 2714 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2715 | } else { |
|
| 2716 | $result = \array_replace($this->getArray(), $array); |
|
| 2717 | } |
|
| 2718 | ||
| 2719 | return static::create( |
|
| 2720 | $result, |
|
| 2721 | $this->iteratorClass, |
|
| 2722 | false |
|
| 2723 | ); |
|
| @@ 2738-2747 (lines=10) @@ | ||
| 2735 | * @return static |
|
| 2736 | * <p>(Immutable)</p> |
|
| 2737 | */ |
|
| 2738 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2739 | { |
|
| 2740 | if ($recursive === true) { |
|
| 2741 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2742 | } else { |
|
| 2743 | $result = \array_merge($this->getArray(), $array); |
|
| 2744 | } |
|
| 2745 | ||
| 2746 | return static::create( |
|
| 2747 | $result, |
|
| 2748 | $this->iteratorClass, |
|
| 2749 | false |
|
| 2750 | ); |
|
| @@ 2764-2773 (lines=10) @@ | ||
| 2761 | * @return static |
|
| 2762 | * <p>(Immutable)</p> |
|
| 2763 | */ |
|
| 2764 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2765 | { |
|
| 2766 | if ($recursive === true) { |
|
| 2767 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2768 | } else { |
|
| 2769 | $result = \array_replace($array, $this->getArray()); |
|
| 2770 | } |
|
| 2771 | ||
| 2772 | return static::create( |
|
| 2773 | $result, |
|
| 2774 | $this->iteratorClass, |
|
| 2775 | false |
|
| 2776 | ); |
|
| @@ 2791-2800 (lines=10) @@ | ||
| 2788 | * @return static |
|
| 2789 | * <p>(Immutable)</p> |
|
| 2790 | */ |
|
| 2791 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2792 | { |
|
| 2793 | if ($recursive === true) { |
|
| 2794 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2795 | } else { |
|
| 2796 | $result = \array_merge($array, $this->getArray()); |
|
| 2797 | } |
|
| 2798 | ||
| 2799 | return static::create( |
|
| 2800 | $result, |
|
| 2801 | $this->iteratorClass, |
|
| 2802 | false |
|
| 2803 | ); |
|