| @@ 3187-3197 (lines=11) @@ | ||
| 3184 | * @return static |
|
| 3185 | * <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
|
| 3186 | */ |
|
| 3187 | public function push(/* variadic arguments allowed */): self |
|
| 3188 | { |
|
| 3189 | $this->generatorToArray(); |
|
| 3190 | ||
| 3191 | if (\func_num_args()) { |
|
| 3192 | $args = \func_get_args(); |
|
| 3193 | \array_push(...[&$this->array], ...$args); |
|
| 3194 | } |
|
| 3195 | ||
| 3196 | return $this; |
|
| 3197 | } |
|
| 3198 | ||
| 3199 | /** |
|
| 3200 | * Get a random value from the current array. |
|
| @@ 4441-4451 (lines=11) @@ | ||
| 4438 | * @return static |
|
| 4439 | * <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
|
| 4440 | */ |
|
| 4441 | public function unshift(/* variadic arguments allowed */): self |
|
| 4442 | { |
|
| 4443 | $this->generatorToArray(); |
|
| 4444 | ||
| 4445 | if (\func_num_args()) { |
|
| 4446 | $args = \func_get_args(); |
|
| 4447 | \array_unshift(...[&$this->array], ...$args); |
|
| 4448 | } |
|
| 4449 | ||
| 4450 | return $this; |
|
| 4451 | } |
|
| 4452 | ||
| 4453 | /** |
|
| 4454 | * Get all values from a array. |
|