| @@ 2163-2172 (lines=10) @@ | ||
| 2160 | * |
|
| 2161 | * @return static <p>(Immutable)</p> |
|
| 2162 | */ |
|
| 2163 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 2164 | { |
|
| 2165 | if (true === $recursive) { |
|
| 2166 | $result = \array_replace_recursive($this->array, $array); |
|
| 2167 | } else { |
|
| 2168 | $result = \array_replace($this->array, $array); |
|
| 2169 | } |
|
| 2170 | ||
| 2171 | return static::create($result); |
|
| 2172 | } |
|
| 2173 | ||
| 2174 | /** |
|
| 2175 | * Merge the new $array into the current array. |
|
| @@ 2185-2194 (lines=10) @@ | ||
| 2182 | * |
|
| 2183 | * @return static <p>(Immutable)</p> |
|
| 2184 | */ |
|
| 2185 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 2186 | { |
|
| 2187 | if (true === $recursive) { |
|
| 2188 | $result = \array_merge_recursive($this->array, $array); |
|
| 2189 | } else { |
|
| 2190 | $result = \array_merge($this->array, $array); |
|
| 2191 | } |
|
| 2192 | ||
| 2193 | return static::create($result); |
|
| 2194 | } |
|
| 2195 | ||
| 2196 | /** |
|
| 2197 | * Merge the the current array into the $array. |
|
| @@ 2206-2215 (lines=10) @@ | ||
| 2203 | * |
|
| 2204 | * @return static <p>(Immutable)</p> |
|
| 2205 | */ |
|
| 2206 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 2207 | { |
|
| 2208 | if (true === $recursive) { |
|
| 2209 | $result = \array_replace_recursive($array, $this->array); |
|
| 2210 | } else { |
|
| 2211 | $result = \array_replace($array, $this->array); |
|
| 2212 | } |
|
| 2213 | ||
| 2214 | return static::create($result); |
|
| 2215 | } |
|
| 2216 | ||
| 2217 | /** |
|
| 2218 | * Merge the current array into the new $array. |
|
| @@ 2228-2237 (lines=10) @@ | ||
| 2225 | * |
|
| 2226 | * @return static <p>(Immutable)</p> |
|
| 2227 | */ |
|
| 2228 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 2229 | { |
|
| 2230 | if (true === $recursive) { |
|
| 2231 | $result = \array_merge_recursive($array, $this->array); |
|
| 2232 | } else { |
|
| 2233 | $result = \array_merge($array, $this->array); |
|
| 2234 | } |
|
| 2235 | ||
| 2236 | return static::create($result); |
|
| 2237 | } |
|
| 2238 | ||
| 2239 | /** |
|
| 2240 | * Get the min value from an array. |
|