| @@ 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. |
|
| @@ 4043-4053 (lines=11) @@ | ||
| 4040 | * @return static |
|
| 4041 | * <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p> |
|
| 4042 | */ |
|
| 4043 | public function unshift(/* variadic arguments allowed */): self |
|
| 4044 | { |
|
| 4045 | $this->generatorToArray(); |
|
| 4046 | ||
| 4047 | if (\func_num_args()) { |
|
| 4048 | $args = \func_get_args(); |
|
| 4049 | \array_unshift(...[&$this->array], ...$args); |
|
| 4050 | } |
|
| 4051 | ||
| 4052 | return $this; |
|
| 4053 | } |
|
| 4054 | ||
| 4055 | /** |
|
| 4056 | * Get all values from a array. |
|