class ArrayList implements ArrayAccess, Countable, IteratorAggregate

Generic list with integer indices.

Methods

static ArrayList
from(array $array)

Transforms array to ArrayList.

getIterator()

No description

int
count()

No description

void
offsetSet(?int $index, T $value)

Replaces or appends an item.

mixed
offsetGet(int $index)

Returns an item.

bool
offsetExists(int $index)

Determines whether an item exists.

void
offsetUnset(int $index)

Removes the element at the specified position in this list.

void
prepend(mixed $value)

Prepends an item.

Details

at line 30
static ArrayList from(array $array)

Transforms array to ArrayList.

Parameters

array $array

Return Value

ArrayList

at line 45
Iterator getIterator()

No description

Return Value

Iterator

at line 53
int count()

No description

Return Value

int

at line 65
void offsetSet(?int $index, T $value)

Replaces or appends an item.

Parameters

?int $index
T $value

Return Value

void

Exceptions

OutOfRangeException

at line 85
mixed offsetGet(int $index)

Returns an item.

Parameters

int $index

Return Value

mixed

Exceptions

OutOfRangeException

at line 99
bool offsetExists(int $index)

Determines whether an item exists.

Parameters

int $index

Return Value

bool

at line 110
void offsetUnset(int $index)

Removes the element at the specified position in this list.

Parameters

int $index

Return Value

void

Exceptions

OutOfRangeException

at line 124
void prepend(mixed $value)

Prepends an item.

Parameters

mixed $value

Return Value

void