|
@@ 2715-2725 (lines=11) @@
|
| 2712 |
|
* @return static |
| 2713 |
|
* <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
| 2714 |
|
*/ |
| 2715 |
|
public function push(/* variadic arguments allowed */): self |
| 2716 |
|
{ |
| 2717 |
|
$this->generatorToArray(); |
| 2718 |
|
|
| 2719 |
|
if (\func_num_args()) { |
| 2720 |
|
$args = \array_merge([&$this->array], \func_get_args()); |
| 2721 |
|
\array_push(...$args); |
| 2722 |
|
} |
| 2723 |
|
|
| 2724 |
|
return $this; |
| 2725 |
|
} |
| 2726 |
|
|
| 2727 |
|
/** |
| 2728 |
|
* Get a random value from the current array. |
|
@@ 3751-3761 (lines=11) @@
|
| 3748 |
|
* @return static |
| 3749 |
|
* <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
| 3750 |
|
*/ |
| 3751 |
|
public function unshift(/* variadic arguments allowed */): self |
| 3752 |
|
{ |
| 3753 |
|
$this->generatorToArray(); |
| 3754 |
|
|
| 3755 |
|
if (\func_num_args()) { |
| 3756 |
|
$args = \array_merge([&$this->array], \func_get_args()); |
| 3757 |
|
\array_unshift(...$args); |
| 3758 |
|
} |
| 3759 |
|
|
| 3760 |
|
return $this; |
| 3761 |
|
} |
| 3762 |
|
|
| 3763 |
|
/** |
| 3764 |
|
* Get all values from a array. |