Class ArrayList
Provides the base class for a generic list (items can be accessed by
index).
-
ArrayObject
implements
IteratorAggregate,
Traversable,
ArrayAccess,
Serializable,
Countable
-
Nette\Collections\Collection
implements
Nette\Collections\ICollection
-
Nette\Collections\ArrayList
implements
Nette\Collections\IList
Methods summary
public
boolean
|
#
insertAt( integer $index, mixed $item )
Inserts the specified element at the specified position in this list.
Inserts the specified element at the specified position in this list.
Parameters
- $index
integer
- $item
mixed
Returns
boolean
Throws
Implementation of
|
public
boolean
|
#
remove( mixed $item )
Removes the first occurrence of the specified element.
Removes the first occurrence of the specified element.
Parameters
Returns
boolean true if this list changed as a result of the call
Throws
Implementation of
|
public
integer|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.
Returns the index of the first occurrence of the specified element,. or FALSE
if this list does not contain this element.
Parameters
Returns
integer|false
Implementation of
|
public
|
#
offsetSet( integer $index, object $item )
Replaces (or appends) the item (\ArrayAccess implementation).
Replaces (or appends) the item (\ArrayAccess implementation).
Parameters
- $index
integer index
- $item
object
Throws
InvalidArgumentException, \NotSupportedException, \ArgumentOutOfRangeException
Implementation of
|
public
mixed
|
#
offsetGet( integer $index )
Returns item (\ArrayAccess implementation).
Returns item (\ArrayAccess implementation).
Parameters
Returns
mixed
Throws
Implementation of
|
public
boolean
|
#
offsetExists( integer $index )
Exists item? (\ArrayAccess implementation).
Exists item? (\ArrayAccess implementation).
Parameters
Returns
boolean
Implementation of
|
public
|
#
offsetUnset( integer $index )
Removes the element at the specified position in this list.
Removes the element at the specified position in this list.
Parameters
Throws
NotSupportedException, \ArgumentOutOfRangeException
Implementation of
|
Methods inherited from Nette\Collections\Collection
__call(),
__callStatic(),
__clone(),
__construct(),
__get(),
__isset(),
__set(),
__unset(),
append(),
beforeAdd(),
clear(),
contains(),
exchangeArray(),
freeze(),
getItemType(),
getIterator(),
getReflection(),
import(),
isFrozen(),
search(),
setArray(),
updating()
|
Methods inherited from ArrayObject
asort(),
count(),
getArrayCopy(),
getFlags(),
getIteratorClass(),
ksort(),
natcasesort(),
natsort(),
serialize(),
setFlags(),
setIteratorClass(),
uasort(),
uksort(),
unserialize()
|
Properties summary
protected
integer
|
$base
|
0 |
|