| @@ 2876-2885 (lines=10) @@ | ||
| 2873 | * @return static |
|
| 2874 | * <p>(Immutable)</p> |
|
| 2875 | */ |
|
| 2876 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2877 | { |
|
| 2878 | if ($recursive === true) { |
|
| 2879 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2880 | } else { |
|
| 2881 | $result = \array_replace($this->getArray(), $array); |
|
| 2882 | } |
|
| 2883 | ||
| 2884 | return static::create( |
|
| 2885 | $result, |
|
| 2886 | $this->iteratorClass, |
|
| 2887 | false |
|
| 2888 | ); |
|
| @@ 2903-2912 (lines=10) @@ | ||
| 2900 | * @return static |
|
| 2901 | * <p>(Immutable)</p> |
|
| 2902 | */ |
|
| 2903 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2904 | { |
|
| 2905 | if ($recursive === true) { |
|
| 2906 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2907 | } else { |
|
| 2908 | $result = \array_merge($this->getArray(), $array); |
|
| 2909 | } |
|
| 2910 | ||
| 2911 | return static::create( |
|
| 2912 | $result, |
|
| 2913 | $this->iteratorClass, |
|
| 2914 | false |
|
| 2915 | ); |
|
| @@ 2929-2938 (lines=10) @@ | ||
| 2926 | * @return static |
|
| 2927 | * <p>(Immutable)</p> |
|
| 2928 | */ |
|
| 2929 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2930 | { |
|
| 2931 | if ($recursive === true) { |
|
| 2932 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2933 | } else { |
|
| 2934 | $result = \array_replace($array, $this->getArray()); |
|
| 2935 | } |
|
| 2936 | ||
| 2937 | return static::create( |
|
| 2938 | $result, |
|
| 2939 | $this->iteratorClass, |
|
| 2940 | false |
|
| 2941 | ); |
|
| @@ 2956-2965 (lines=10) @@ | ||
| 2953 | * @return static |
|
| 2954 | * <p>(Immutable)</p> |
|
| 2955 | */ |
|
| 2956 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2957 | { |
|
| 2958 | if ($recursive === true) { |
|
| 2959 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2960 | } else { |
|
| 2961 | $result = \array_merge($array, $this->getArray()); |
|
| 2962 | } |
|
| 2963 | ||
| 2964 | return static::create( |
|
| 2965 | $result, |
|
| 2966 | $this->iteratorClass, |
|
| 2967 | false |
|
| 2968 | ); |
|