You are here

class LazyArrayCollection in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/collections/tests/Doctrine/Tests/LazyArrayCollection.php \Doctrine\Tests\LazyArrayCollection

Simple lazy collection that used an ArrayCollection as backed collection

Hierarchy

Expanded class hierarchy of LazyArrayCollection

1 file declares its use of LazyArrayCollection
AbstractLazyCollectionTest.php in vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php

File

vendor/doctrine/collections/tests/Doctrine/Tests/LazyArrayCollection.php, line 11

Namespace

Doctrine\Tests
View source
class LazyArrayCollection extends AbstractLazyCollection {

  /**
   * Do the initialization logic
   *
   * @return void
   */
  protected function doInitialize() {
    $this->collection = new ArrayCollection(array(
      'a',
      'b',
      'c',
    ));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractLazyCollection::$collection protected property The backed collection to use
AbstractLazyCollection::$initialized protected property
AbstractLazyCollection::add public function Adds an element at the end of the collection. Overrides Collection::add
AbstractLazyCollection::clear public function Clears the collection, removing all elements. Overrides Collection::clear
AbstractLazyCollection::contains public function Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection. Overrides Collection::contains
AbstractLazyCollection::containsKey public function Checks whether the collection contains an element with the specified key/index. Overrides Collection::containsKey
AbstractLazyCollection::count public function
AbstractLazyCollection::current public function Gets the element of the collection at the current iterator position. Overrides Collection::current
AbstractLazyCollection::exists public function Tests for the existence of an element that satisfies the given predicate. Overrides Collection::exists
AbstractLazyCollection::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
AbstractLazyCollection::first public function Sets the internal iterator to the first element in the collection and returns this element. Overrides Collection::first
AbstractLazyCollection::forAll public function Tests whether the given predicate p holds for all elements of this collection. Overrides Collection::forAll
AbstractLazyCollection::get public function Gets the element at the specified key/index. Overrides Collection::get
AbstractLazyCollection::getIterator public function
AbstractLazyCollection::getKeys public function Gets all keys/indices of the collection. Overrides Collection::getKeys
AbstractLazyCollection::getValues public function Gets all values of the collection. Overrides Collection::getValues
AbstractLazyCollection::indexOf public function Gets the index/key of a given 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
AbstractLazyCollection::initialize protected function Initialize the collection
AbstractLazyCollection::isEmpty public function Checks whether the collection is empty (contains no elements). Overrides Collection::isEmpty
AbstractLazyCollection::isInitialized public function Is the lazy collection already initialized?
AbstractLazyCollection::key public function Gets the key/index of the element at the current iterator position. Overrides Collection::key
AbstractLazyCollection::last public function Sets the internal iterator to the last element in the collection and returns this element. Overrides Collection::last
AbstractLazyCollection::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
AbstractLazyCollection::next public function Moves the internal iterator position to the next element and returns this element. Overrides Collection::next
AbstractLazyCollection::offsetExists public function
AbstractLazyCollection::offsetGet public function
AbstractLazyCollection::offsetSet public function
AbstractLazyCollection::offsetUnset public function
AbstractLazyCollection::partition public function Partitions this collection in two collections according to a predicate. Keys are preserved in the resulting collections. Overrides Collection::partition
AbstractLazyCollection::remove public function Removes the element at the specified index from the collection. Overrides Collection::remove
AbstractLazyCollection::removeElement public function Removes the specified element from the collection, if it is found. Overrides Collection::removeElement
AbstractLazyCollection::set public function Sets an element in the collection at the specified key/index. Overrides Collection::set
AbstractLazyCollection::slice public function Extracts a slice of $length elements starting at position $offset from the Collection. Overrides Collection::slice
AbstractLazyCollection::toArray public function Gets a native PHP array representation of the collection. Overrides Collection::toArray
LazyArrayCollection::doInitialize protected function Do the initialization logic Overrides AbstractLazyCollection::doInitialize