class ArrayList extends Object 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($index, $value)

Replaces or appends a item.

mixed
offsetGet($index)

Returns a item.

bool
offsetExists($index)

Determines whether a item exists.

void
offsetUnset($index)

Removes the element at the specified position in this list.

Details

at line 25
ArrayIterator getIterator()

Returns an iterator over all items.

Return Value

ArrayIterator

at line 35
int count()

Returns items count.

Return Value

int

at line 48
void offsetSet($index, $value)

Replaces or appends a item.

Parameters

$index
$value

Return Value

void

Exceptions

OutOfRangeException

at line 68
mixed offsetGet($index)

Returns a item.

Parameters

$index

Return Value

mixed

Exceptions

OutOfRangeException

at line 82
bool offsetExists($index)

Determines whether a item exists.

Parameters

$index

Return Value

bool

at line 94
void offsetUnset($index)

Removes the element at the specified position in this list.

Parameters

$index

Return Value

void

Exceptions

OutOfRangeException