| @@ 3126-3136 (lines=11) @@ | ||
| 3123 | * @return static |
|
| 3124 | * <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
|
| 3125 | */ |
|
| 3126 | public function push(/* variadic arguments allowed */): self |
|
| 3127 | { |
|
| 3128 | $this->generatorToArray(); |
|
| 3129 | ||
| 3130 | if (\func_num_args()) { |
|
| 3131 | $args = \func_get_args(); |
|
| 3132 | \array_push(...[&$this->array], ...$args); |
|
| 3133 | } |
|
| 3134 | ||
| 3135 | return $this; |
|
| 3136 | } |
|
| 3137 | ||
| 3138 | /** |
|
| 3139 | * Get a random value from the current array. |
|
| @@ 4380-4390 (lines=11) @@ | ||
| 4377 | * @return static |
|
| 4378 | * <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
|
| 4379 | */ |
|
| 4380 | public function unshift(/* variadic arguments allowed */): self |
|
| 4381 | { |
|
| 4382 | $this->generatorToArray(); |
|
| 4383 | ||
| 4384 | if (\func_num_args()) { |
|
| 4385 | $args = \func_get_args(); |
|
| 4386 | \array_unshift(...[&$this->array], ...$args); |
|
| 4387 | } |
|
| 4388 | ||
| 4389 | return $this; |
|
| 4390 | } |
|
| 4391 | ||
| 4392 | /** |
|
| 4393 | * Get all values from a array. |
|