ArrayList
class ArrayList implements ArrayAccess, Countable, IteratorAggregate
Provides the base class for a generic list (items can be accessed by index).
Methods
getIterator()
Returns an iterator over all items.
int
count()
Returns items count.
void
offsetSet(int|null $index, T $value)
Replaces or appends a item.
mixed
offsetGet(int $index)
Returns a item.
bool
offsetExists(int $index)
Determines whether a item exists.
void
offsetUnset(int $index)
Removes the element at the specified position in this list.
void
prepend(mixed $value)
Prepends a item.
Details
at line 30
static ArrayList
from(array $array)
Transforms array to ArrayList.
at line 46
ArrayIterator
getIterator()
Returns an iterator over all items.
at line 55
int
count()
Returns items count.
at line 67
void
offsetSet(int|null $index, T $value)
Replaces or appends a item.
at line 87
mixed
offsetGet(int $index)
Returns a item.
at line 101
bool
offsetExists(int $index)
Determines whether a item exists.
at line 112
void
offsetUnset(int $index)
Removes the element at the specified position in this list.
at line 126
void
prepend(mixed $value)
Prepends a item.
Traits
Strict class for better experience.