| @@ 2914-2924 (lines=11) @@ | ||
| 2911 | * @return static |
|
| 2912 | * <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
|
| 2913 | */ |
|
| 2914 | public function push(/* variadic arguments allowed */): self |
|
| 2915 | { |
|
| 2916 | $this->generatorToArray(); |
|
| 2917 | ||
| 2918 | if (\func_num_args()) { |
|
| 2919 | $args = \func_get_args(); |
|
| 2920 | \array_push(...[&$this->array], ...$args); |
|
| 2921 | } |
|
| 2922 | ||
| 2923 | return $this; |
|
| 2924 | } |
|
| 2925 | ||
| 2926 | /** |
|
| 2927 | * Get a random value from the current array. |
|
| @@ 4068-4078 (lines=11) @@ | ||
| 4065 | * @return static |
|
| 4066 | * <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
|
| 4067 | */ |
|
| 4068 | public function unshift(/* variadic arguments allowed */): self |
|
| 4069 | { |
|
| 4070 | $this->generatorToArray(); |
|
| 4071 | ||
| 4072 | if (\func_num_args()) { |
|
| 4073 | $args = \func_get_args(); |
|
| 4074 | \array_unshift(...[&$this->array], ...$args); |
|
| 4075 | } |
|
| 4076 | ||
| 4077 | return $this; |
|
| 4078 | } |
|
| 4079 | ||
| 4080 | /** |
|
| 4081 | * Get all values from a array. |
|