Class ArrayList (namespace Nette\Collections)
Provides the base class for a generic list (items can be accessed by index).
ArrayObject | --Collection | --ArrayList
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
int|FALSE |
indexOf
(mixed $item)
Returns the index of the first occurrence of the specified element,.
|
bool |
insertAt
(int $index, mixed $item)
Inserts the specified element at the specified position in this list.
|
bool |
offsetExists
(int $index)
Exists item? (\ArrayAccess implementation).
|
mixed |
offsetGet
(int $index)
Returns item (\ArrayAccess implementation).
|
void |
offsetSet
(int $index, object $item)
Replaces (or appends) the item (\ArrayAccess implementation).
|
void |
offsetUnset
(int $index)
Removes the element at the specified position in this list.
|
bool |
remove
(mixed $item)
Removes the first occurrence of the specified element.
|
Methods Inherited From Collection |
---|
__construct(), append(), beforeAdd(), beforeRemove(), clear(), contains(), exchangeArray(), getClass(), getIterator(), import(), isReadOnly(), remove(), search(), setArray(), setReadOnly(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected int | $base | 0 |
line 39 |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 94 indexOfpublic int|FALSE indexOf (mixed $item) Returns the index of the first occurrence of the specified element,. or FALSE if this list does not contain this element. Implementation of:
|
|||||||||||||||||||||
line 49 insertAtpublic bool insertAt (int $index, mixed $item) Inserts the specified element at the specified position in this list. Implementation of:
|
|||||||||||||||||||||
line 154 offsetExistspublic bool offsetExists (int $index) Exists item? (\ArrayAccess implementation).
|
|||||||||||||||||||||
line 137 offsetGetpublic mixed offsetGet (int $index) Returns item (\ArrayAccess implementation).
|
|||||||||||||||||||||
line 113 offsetSetpublic void offsetSet (int $index, object $item) Replaces (or appends) the item (\ArrayAccess implementation).
|
|||||||||||||||||||||
line 168 offsetUnsetpublic void offsetUnset (int $index) Removes the element at the specified position in this list.
|
|||||||||||||||||||||
line 71 removepublic bool remove (mixed $item) Removes the first occurrence of the specified element. Implementation of:
|