| @@ 2856-2865 (lines=10) @@ | ||
| 2853 | * @return static |
|
| 2854 | * <p>(Immutable)</p> |
|
| 2855 | */ |
|
| 2856 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2857 | { |
|
| 2858 | if ($recursive === true) { |
|
| 2859 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2860 | } else { |
|
| 2861 | $result = \array_replace($this->getArray(), $array); |
|
| 2862 | } |
|
| 2863 | ||
| 2864 | return static::create( |
|
| 2865 | $result, |
|
| 2866 | $this->iteratorClass, |
|
| 2867 | false |
|
| 2868 | ); |
|
| @@ 2883-2892 (lines=10) @@ | ||
| 2880 | * @return static |
|
| 2881 | * <p>(Immutable)</p> |
|
| 2882 | */ |
|
| 2883 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2884 | { |
|
| 2885 | if ($recursive === true) { |
|
| 2886 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2887 | } else { |
|
| 2888 | $result = \array_merge($this->getArray(), $array); |
|
| 2889 | } |
|
| 2890 | ||
| 2891 | return static::create( |
|
| 2892 | $result, |
|
| 2893 | $this->iteratorClass, |
|
| 2894 | false |
|
| 2895 | ); |
|
| @@ 2909-2918 (lines=10) @@ | ||
| 2906 | * @return static |
|
| 2907 | * <p>(Immutable)</p> |
|
| 2908 | */ |
|
| 2909 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2910 | { |
|
| 2911 | if ($recursive === true) { |
|
| 2912 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2913 | } else { |
|
| 2914 | $result = \array_replace($array, $this->getArray()); |
|
| 2915 | } |
|
| 2916 | ||
| 2917 | return static::create( |
|
| 2918 | $result, |
|
| 2919 | $this->iteratorClass, |
|
| 2920 | false |
|
| 2921 | ); |
|
| @@ 2936-2945 (lines=10) @@ | ||
| 2933 | * @return static |
|
| 2934 | * <p>(Immutable)</p> |
|
| 2935 | */ |
|
| 2936 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2937 | { |
|
| 2938 | if ($recursive === true) { |
|
| 2939 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2940 | } else { |
|
| 2941 | $result = \array_merge($array, $this->getArray()); |
|
| 2942 | } |
|
| 2943 | ||
| 2944 | return static::create( |
|
| 2945 | $result, |
|
| 2946 | $this->iteratorClass, |
|
| 2947 | false |
|
| 2948 | ); |
|