| @@ 3056-3066 (lines=11) @@ | ||
| 3053 | * @return static |
|
| 3054 | * <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p> |
|
| 3055 | */ |
|
| 3056 | public function push(/* variadic arguments allowed */): self |
|
| 3057 | { |
|
| 3058 | $this->generatorToArray(); |
|
| 3059 | ||
| 3060 | if (\func_num_args()) { |
|
| 3061 | $args = \func_get_args(); |
|
| 3062 | \array_push(...[&$this->array], ...$args); |
|
| 3063 | } |
|
| 3064 | ||
| 3065 | return $this; |
|
| 3066 | } |
|
| 3067 | ||
| 3068 | /** |
|
| 3069 | * Get a random value from the current array. |
|
| @@ 4310-4320 (lines=11) @@ | ||
| 4307 | * @return static |
|
| 4308 | * <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
|
| 4309 | */ |
|
| 4310 | public function unshift(/* variadic arguments allowed */): self |
|
| 4311 | { |
|
| 4312 | $this->generatorToArray(); |
|
| 4313 | ||
| 4314 | if (\func_num_args()) { |
|
| 4315 | $args = \func_get_args(); |
|
| 4316 | \array_unshift(...[&$this->array], ...$args); |
|
| 4317 | } |
|
| 4318 | ||
| 4319 | return $this; |
|
| 4320 | } |
|
| 4321 | ||
| 4322 | /** |
|
| 4323 | * Get all values from a array. |
|