|
@@ 123-130 (lines=8) @@
|
| 120 |
|
* |
| 121 |
|
* @return ArrayImitator A new array with the keys/values from $array added |
| 122 |
|
*/ |
| 123 |
|
public function merge(array $array, $recursively = false) |
| 124 |
|
{ |
| 125 |
|
if (true === $recursively) { |
| 126 |
|
return new static(array_merge_recursive($this->elements, $array)); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
return new static(array_merge($this->elements, $array)); |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
/** |
| 133 |
|
* Pad the current array to the specified size with a given value. |
|
@@ 164-171 (lines=8) @@
|
| 161 |
|
* |
| 162 |
|
* @return ArrayImitator A new array with the same keys but new values |
| 163 |
|
*/ |
| 164 |
|
public function replace(array $array, $recursively = false) |
| 165 |
|
{ |
| 166 |
|
if (true === $recursively) { |
| 167 |
|
return new static(array_replace_recursive($this->elements, $array)); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
return new static(array_replace($this->elements, $array)); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
/** |
| 174 |
|
* Reverse the values order of the current array. |