| @@ 2822-2831 (lines=10) @@ | ||
| 2819 | * @return static |
|
| 2820 | * <p>(Immutable)</p> |
|
| 2821 | */ |
|
| 2822 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2823 | { |
|
| 2824 | if ($recursive === true) { |
|
| 2825 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2826 | } else { |
|
| 2827 | $result = \array_replace($this->getArray(), $array); |
|
| 2828 | } |
|
| 2829 | ||
| 2830 | return static::create( |
|
| 2831 | $result, |
|
| 2832 | $this->iteratorClass, |
|
| 2833 | false |
|
| 2834 | ); |
|
| @@ 2849-2858 (lines=10) @@ | ||
| 2846 | * @return static |
|
| 2847 | * <p>(Immutable)</p> |
|
| 2848 | */ |
|
| 2849 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2850 | { |
|
| 2851 | if ($recursive === true) { |
|
| 2852 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2853 | } else { |
|
| 2854 | $result = \array_merge($this->getArray(), $array); |
|
| 2855 | } |
|
| 2856 | ||
| 2857 | return static::create( |
|
| 2858 | $result, |
|
| 2859 | $this->iteratorClass, |
|
| 2860 | false |
|
| 2861 | ); |
|
| @@ 2875-2884 (lines=10) @@ | ||
| 2872 | * @return static |
|
| 2873 | * <p>(Immutable)</p> |
|
| 2874 | */ |
|
| 2875 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2876 | { |
|
| 2877 | if ($recursive === true) { |
|
| 2878 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2879 | } else { |
|
| 2880 | $result = \array_replace($array, $this->getArray()); |
|
| 2881 | } |
|
| 2882 | ||
| 2883 | return static::create( |
|
| 2884 | $result, |
|
| 2885 | $this->iteratorClass, |
|
| 2886 | false |
|
| 2887 | ); |
|
| @@ 2902-2911 (lines=10) @@ | ||
| 2899 | * @return static |
|
| 2900 | * <p>(Immutable)</p> |
|
| 2901 | */ |
|
| 2902 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2903 | { |
|
| 2904 | if ($recursive === true) { |
|
| 2905 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2906 | } else { |
|
| 2907 | $result = \array_merge($array, $this->getArray()); |
|
| 2908 | } |
|
| 2909 | ||
| 2910 | return static::create( |
|
| 2911 | $result, |
|
| 2912 | $this->iteratorClass, |
|
| 2913 | false |
|
| 2914 | ); |
|