| @@ 1168-1177 (lines=10) @@ | ||
| 1165 | * |
|
| 1166 | * @return Arrayy |
|
| 1167 | */ |
|
| 1168 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1169 | { |
|
| 1170 | if (true === $recursive) { |
|
| 1171 | $result = array_replace_recursive($this->array, $array); |
|
| 1172 | } else { |
|
| 1173 | $result = array_replace($this->array, $array); |
|
| 1174 | } |
|
| 1175 | ||
| 1176 | return static::create($result); |
|
| 1177 | } |
|
| 1178 | ||
| 1179 | /** |
|
| 1180 | * alias: for "Arrayy->searchIndex()" |
|
| @@ 1327-1336 (lines=10) @@ | ||
| 1324 | * |
|
| 1325 | * @return Arrayy |
|
| 1326 | */ |
|
| 1327 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1328 | { |
|
| 1329 | if (true === $recursive) { |
|
| 1330 | $result = array_merge_recursive($this->array, $array); |
|
| 1331 | } else { |
|
| 1332 | $result = array_merge($this->array, $array); |
|
| 1333 | } |
|
| 1334 | ||
| 1335 | return static::create($result); |
|
| 1336 | } |
|
| 1337 | ||
| 1338 | /** |
|
| 1339 | * Merge the current array into the new $array. |
|
| @@ 1349-1358 (lines=10) @@ | ||
| 1346 | * |
|
| 1347 | * @return Arrayy |
|
| 1348 | */ |
|
| 1349 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1350 | { |
|
| 1351 | if (true === $recursive) { |
|
| 1352 | $result = array_merge_recursive($array, $this->array); |
|
| 1353 | } else { |
|
| 1354 | $result = array_merge($array, $this->array); |
|
| 1355 | } |
|
| 1356 | ||
| 1357 | return static::create($result); |
|
| 1358 | } |
|
| 1359 | ||
| 1360 | /** |
|
| 1361 | * Merge the the current array into the $array. |
|
| @@ 1370-1379 (lines=10) @@ | ||
| 1367 | * |
|
| 1368 | * @return Arrayy |
|
| 1369 | */ |
|
| 1370 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1371 | { |
|
| 1372 | if (true === $recursive) { |
|
| 1373 | $result = array_replace_recursive($array, $this->array); |
|
| 1374 | } else { |
|
| 1375 | $result = array_replace($array, $this->array); |
|
| 1376 | } |
|
| 1377 | ||
| 1378 | return static::create($result); |
|
| 1379 | } |
|
| 1380 | ||
| 1381 | /** |
|
| 1382 | * Return values that are only in the current array. |
|