| @@ 1172-1181 (lines=10) @@ | ||
| 1169 | * |
|
| 1170 | * @return Arrayy |
|
| 1171 | */ |
|
| 1172 | public function mergeAppendKeepIndex(array $array = array(), $recursive = false) |
|
| 1173 | { |
|
| 1174 | if (true === $recursive) { |
|
| 1175 | $result = array_replace_recursive($this->array, $array); |
|
| 1176 | } else { |
|
| 1177 | $result = array_replace($this->array, $array); |
|
| 1178 | } |
|
| 1179 | ||
| 1180 | return static::create($result); |
|
| 1181 | } |
|
| 1182 | ||
| 1183 | /** |
|
| 1184 | * alias: for "Arrayy->searchIndex()" |
|
| @@ 1347-1356 (lines=10) @@ | ||
| 1344 | * |
|
| 1345 | * @return Arrayy |
|
| 1346 | */ |
|
| 1347 | public function mergeAppendNewIndex(array $array = array(), $recursive = false) |
|
| 1348 | { |
|
| 1349 | if (true === $recursive) { |
|
| 1350 | $result = array_merge_recursive($this->array, $array); |
|
| 1351 | } else { |
|
| 1352 | $result = array_merge($this->array, $array); |
|
| 1353 | } |
|
| 1354 | ||
| 1355 | return static::create($result); |
|
| 1356 | } |
|
| 1357 | ||
| 1358 | /** |
|
| 1359 | * Merge the current array into the new $array. |
|
| @@ 1369-1378 (lines=10) @@ | ||
| 1366 | * |
|
| 1367 | * @return Arrayy |
|
| 1368 | */ |
|
| 1369 | public function mergePrependNewIndex(array $array = array(), $recursive = false) |
|
| 1370 | { |
|
| 1371 | if (true === $recursive) { |
|
| 1372 | $result = array_merge_recursive($array, $this->array); |
|
| 1373 | } else { |
|
| 1374 | $result = array_merge($array, $this->array); |
|
| 1375 | } |
|
| 1376 | ||
| 1377 | return static::create($result); |
|
| 1378 | } |
|
| 1379 | ||
| 1380 | /** |
|
| 1381 | * Merge the the current array into the $array. |
|
| @@ 1390-1399 (lines=10) @@ | ||
| 1387 | * |
|
| 1388 | * @return Arrayy |
|
| 1389 | */ |
|
| 1390 | public function mergePrependKeepIndex(array $array = array(), $recursive = false) |
|
| 1391 | { |
|
| 1392 | if (true === $recursive) { |
|
| 1393 | $result = array_replace_recursive($array, $this->array); |
|
| 1394 | } else { |
|
| 1395 | $result = array_replace($array, $this->array); |
|
| 1396 | } |
|
| 1397 | ||
| 1398 | return static::create($result); |
|
| 1399 | } |
|
| 1400 | ||
| 1401 | /** |
|
| 1402 | * Return values that are only in the current array. |
|