Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayList
  • NCollection
  • NHashtable
  • NSet

Interfaces

  • ICollection
  • IList
  • IMap
  • ISet

Exceptions

  • NKeyNotFoundException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NArrayList

Provides the base class for a generic list (items can be accessed by index).

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by NCollection implements ICollection
Extended by NArrayList implements IList

Direct known subclasses

NMultiRouter
Package: Nette\Collections
Author: David Grudl
Located at Collections/ArrayList.php
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

ArgumentOutOfRangeException

Implementation of

IList::insertAt
public boolean
# remove( mixed $item )

Removes the first occurrence of the specified element.

Removes the first occurrence of the specified element.

Parameters

$item
mixed

Returns

boolean
true if this list changed as a result of the call

Throws

NotSupportedException

Implementation of

ICollection::remove
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

$item
mixed

Returns

integer|false

Implementation of

IList::indexOf
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

ArrayAccess::offsetSet
public mixed
# offsetGet( integer $index )

Returns item (ArrayAccess implementation).

Returns item (ArrayAccess implementation).

Parameters

$index
integer
index

Returns

mixed

Throws

ArgumentOutOfRangeException

Implementation of

ArrayAccess::offsetGet
public boolean
# offsetExists( integer $index )

Exists item? (ArrayAccess implementation).

Exists item? (ArrayAccess implementation).

Parameters

$index
integer
index

Returns

boolean

Implementation of

ArrayAccess::offsetExists
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

$index
integer
index

Throws

NotSupportedException,
ArgumentOutOfRangeException

Implementation of

ArrayAccess::offsetUnset
Methods inherited from NCollection
__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()
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
Properties summary
protected integer $base 0
#
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0