class ArrayCollection

An ArrayCollection is a Collection implementation that wraps a regular PHP array.

@since 2.0 @author Guilherme Blanco <guilhermeblanco@hotmail.com> @author Jonathan Wage <jonwage@gmail.com> @author Roman Borschel <roman@code-factory.org>

Hierarchy

Expanded class hierarchy of ArrayCollection

1 file declares its use of ArrayCollection

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php, line 34

Namespace

Doctrine\Common\Collections
View source

Members

Namesort descending Modifiers Type Description Overrides
ArrayCollection::$_elements private property An array containing the entries of this collection.
ArrayCollection::add public function Adds an element to the collection. Overrides Collection::add
ArrayCollection::clear public function Clears the collection. Overrides Collection::clear
ArrayCollection::contains public function Checks whether the given element is contained in the collection. Only element values are compared, not keys. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality. Overrides Collection::contains
ArrayCollection::containsKey public function Checks whether the collection contains a specific key/index. Overrides Collection::containsKey
ArrayCollection::count public function Returns the number of elements in the collection.
ArrayCollection::current public function Gets the element of the collection at the current internal iterator position. Overrides Collection::current
ArrayCollection::exists public function Tests for the existence of an element that satisfies the given predicate. Overrides Collection::exists
ArrayCollection::filter public function Returns all the elements of this collection that satisfy the predicate p. The order of the elements is preserved. Overrides Collection::filter
ArrayCollection::first public function Sets the internal iterator to the first element in the collection and returns this element. Overrides Collection::first
ArrayCollection::forAll public function Applies the given predicate p to all elements of this collection, returning true, if the predicate yields true for all elements. Overrides Collection::forAll
ArrayCollection::get public function Gets the element with the given key/index. Overrides Collection::get
ArrayCollection::getIterator public function Gets an iterator for iterating over the elements in the collection.
ArrayCollection::getKeys public function Gets all keys/indexes of the collection elements. Overrides Collection::getKeys
ArrayCollection::getValues public function Gets all elements. Overrides Collection::getValues
ArrayCollection::indexOf public function Searches for a given element and, if found, returns the corresponding key/index of that element. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality. Overrides Collection::indexOf
ArrayCollection::isEmpty public function Checks whether the collection is empty. Overrides Collection::isEmpty
ArrayCollection::key public function Gets the current key/index at the current internal iterator position. Overrides Collection::key
ArrayCollection::last public function Sets the internal iterator to the last element in the collection and returns this element. Overrides Collection::last
ArrayCollection::map public function Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. Overrides Collection::map
ArrayCollection::matching public function Select all elements from a selectable that match the criteria and return a new collection containing these elements. Overrides Selectable::matching
ArrayCollection::next public function Moves the internal iterator position to the next element. Overrides Collection::next
ArrayCollection::offsetExists public function ArrayAccess implementation of offsetExists()
ArrayCollection::offsetGet public function ArrayAccess implementation of offsetGet()
ArrayCollection::offsetSet public function ArrayAccess implementation of offsetSet()
ArrayCollection::offsetUnset public function ArrayAccess implementation of offsetUnset()
ArrayCollection::partition public function Partitions this collection in two collections according to a predicate. Keys are preserved in the resulting collections. Overrides Collection::partition
ArrayCollection::remove public function Removes an element with a specific key/index from the collection. Overrides Collection::remove
ArrayCollection::removeElement public function Removes the specified element from the collection, if it is found. Overrides Collection::removeElement
ArrayCollection::set public function Adds/sets an element in the collection at the index / with the specified key. Overrides Collection::set
ArrayCollection::slice public function Extract a slice of $length elements starting at position $offset from the Collection. Overrides Collection::slice
ArrayCollection::toArray public function Gets the PHP array representation of this collection. Overrides Collection::toArray
ArrayCollection::__construct public function Initializes a new ArrayCollection.
ArrayCollection::__toString public function Returns a string representation of this object.