| @@ 2068-2077 (lines=10) @@ | ||
| 2065 | * |
|
| 2066 | * @return static <p>(Immutable)</p> |
|
| 2067 | */ |
|
| 2068 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 2069 | { |
|
| 2070 | if (true === $recursive) { |
|
| 2071 | $result = \array_replace_recursive($this->array, $array); |
|
| 2072 | } else { |
|
| 2073 | $result = \array_replace($this->array, $array); |
|
| 2074 | } |
|
| 2075 | ||
| 2076 | return static::create($result); |
|
| 2077 | } |
|
| 2078 | ||
| 2079 | /** |
|
| 2080 | * Merge the new $array into the current array. |
|
| @@ 2090-2099 (lines=10) @@ | ||
| 2087 | * |
|
| 2088 | * @return static <p>(Immutable)</p> |
|
| 2089 | */ |
|
| 2090 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 2091 | { |
|
| 2092 | if (true === $recursive) { |
|
| 2093 | $result = \array_merge_recursive($this->array, $array); |
|
| 2094 | } else { |
|
| 2095 | $result = \array_merge($this->array, $array); |
|
| 2096 | } |
|
| 2097 | ||
| 2098 | return static::create($result); |
|
| 2099 | } |
|
| 2100 | ||
| 2101 | /** |
|
| 2102 | * Merge the the current array into the $array. |
|
| @@ 2111-2120 (lines=10) @@ | ||
| 2108 | * |
|
| 2109 | * @return static <p>(Immutable)</p> |
|
| 2110 | */ |
|
| 2111 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 2112 | { |
|
| 2113 | if (true === $recursive) { |
|
| 2114 | $result = \array_replace_recursive($array, $this->array); |
|
| 2115 | } else { |
|
| 2116 | $result = \array_replace($array, $this->array); |
|
| 2117 | } |
|
| 2118 | ||
| 2119 | return static::create($result); |
|
| 2120 | } |
|
| 2121 | ||
| 2122 | /** |
|
| 2123 | * Merge the current array into the new $array. |
|
| @@ 2133-2142 (lines=10) @@ | ||
| 2130 | * |
|
| 2131 | * @return static <p>(Immutable)</p> |
|
| 2132 | */ |
|
| 2133 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 2134 | { |
|
| 2135 | if (true === $recursive) { |
|
| 2136 | $result = \array_merge_recursive($array, $this->array); |
|
| 2137 | } else { |
|
| 2138 | $result = \array_merge($array, $this->array); |
|
| 2139 | } |
|
| 2140 | ||
| 2141 | return static::create($result); |
|
| 2142 | } |
|
| 2143 | ||
| 2144 | /** |
|
| 2145 | * Get the min value from an array. |
|