|
@@ 2661-2670 (lines=10) @@
|
| 2658 |
|
* |
| 2659 |
|
* @return static <p>(Immutable)</p> |
| 2660 |
|
*/ |
| 2661 |
|
public function mergeAppendKeepIndex(array $array = [], bool $recursive = false) |
| 2662 |
|
{ |
| 2663 |
|
if (true === $recursive) { |
| 2664 |
|
$result = \array_replace_recursive($this->array, $array); |
| 2665 |
|
} else { |
| 2666 |
|
$result = \array_replace($this->array, $array); |
| 2667 |
|
} |
| 2668 |
|
|
| 2669 |
|
return static::create($result, $this->iteratorClass, false); |
| 2670 |
|
} |
| 2671 |
|
|
| 2672 |
|
/** |
| 2673 |
|
* Merge the new $array into the current array. |
|
@@ 2683-2692 (lines=10) @@
|
| 2680 |
|
* |
| 2681 |
|
* @return static <p>(Immutable)</p> |
| 2682 |
|
*/ |
| 2683 |
|
public function mergeAppendNewIndex(array $array = [], bool $recursive = false) |
| 2684 |
|
{ |
| 2685 |
|
if (true === $recursive) { |
| 2686 |
|
$result = \array_merge_recursive($this->array, $array); |
| 2687 |
|
} else { |
| 2688 |
|
$result = \array_merge($this->array, $array); |
| 2689 |
|
} |
| 2690 |
|
|
| 2691 |
|
return static::create($result, $this->iteratorClass, false); |
| 2692 |
|
} |
| 2693 |
|
|
| 2694 |
|
/** |
| 2695 |
|
* Merge the the current array into the $array. |
|
@@ 2704-2713 (lines=10) @@
|
| 2701 |
|
* |
| 2702 |
|
* @return static <p>(Immutable)</p> |
| 2703 |
|
*/ |
| 2704 |
|
public function mergePrependKeepIndex(array $array = [], bool $recursive = false) |
| 2705 |
|
{ |
| 2706 |
|
if (true === $recursive) { |
| 2707 |
|
$result = \array_replace_recursive($array, $this->array); |
| 2708 |
|
} else { |
| 2709 |
|
$result = \array_replace($array, $this->array); |
| 2710 |
|
} |
| 2711 |
|
|
| 2712 |
|
return static::create($result, $this->iteratorClass, false); |
| 2713 |
|
} |
| 2714 |
|
|
| 2715 |
|
/** |
| 2716 |
|
* Merge the current array into the new $array. |
|
@@ 2726-2735 (lines=10) @@
|
| 2723 |
|
* |
| 2724 |
|
* @return static <p>(Immutable)</p> |
| 2725 |
|
*/ |
| 2726 |
|
public function mergePrependNewIndex(array $array = [], bool $recursive = false) |
| 2727 |
|
{ |
| 2728 |
|
if (true === $recursive) { |
| 2729 |
|
$result = \array_merge_recursive($array, $this->array); |
| 2730 |
|
} else { |
| 2731 |
|
$result = \array_merge($array, $this->array); |
| 2732 |
|
} |
| 2733 |
|
|
| 2734 |
|
return static::create($result, $this->iteratorClass, false); |
| 2735 |
|
} |
| 2736 |
|
|
| 2737 |
|
/** |
| 2738 |
|
* @return ArrayyMeta|static |