|
@@ 2833-2843 (lines=11) @@
|
| 2830 |
|
* @return static |
| 2831 |
|
* <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
| 2832 |
|
*/ |
| 2833 |
|
public function push(/* variadic arguments allowed */): self |
| 2834 |
|
{ |
| 2835 |
|
$this->generatorToArray(); |
| 2836 |
|
|
| 2837 |
|
if (\func_num_args()) { |
| 2838 |
|
$args = \array_merge([&$this->array], \func_get_args()); |
| 2839 |
|
\array_push(...$args); |
| 2840 |
|
} |
| 2841 |
|
|
| 2842 |
|
return $this; |
| 2843 |
|
} |
| 2844 |
|
|
| 2845 |
|
/** |
| 2846 |
|
* Get a random value from the current array. |
|
@@ 3957-3967 (lines=11) @@
|
| 3954 |
|
* @return static |
| 3955 |
|
* <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
| 3956 |
|
*/ |
| 3957 |
|
public function unshift(/* variadic arguments allowed */): self |
| 3958 |
|
{ |
| 3959 |
|
$this->generatorToArray(); |
| 3960 |
|
|
| 3961 |
|
if (\func_num_args()) { |
| 3962 |
|
$args = \array_merge([&$this->array], \func_get_args()); |
| 3963 |
|
\array_unshift(...$args); |
| 3964 |
|
} |
| 3965 |
|
|
| 3966 |
|
return $this; |
| 3967 |
|
} |
| 3968 |
|
|
| 3969 |
|
/** |
| 3970 |
|
* Get all values from a array. |