class LazyArrayCollection in Plug 7
Simple lazy collection that used an ArrayCollection as backed collection
Hierarchy
- class \Doctrine\Common\Collections\AbstractLazyCollection implements Collection
- class \Doctrine\Tests\LazyArrayCollection
Expanded class hierarchy of LazyArrayCollection
1 file declares its use of LazyArrayCollection
- AbstractLazyCollectionTest.php in lib/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ AbstractLazyCollectionTest.php
File
- lib/
doctrine/ collections/ tests/ Doctrine/ Tests/ LazyArrayCollection.php, line 11
Namespace
Doctrine\TestsView source
class LazyArrayCollection extends AbstractLazyCollection {
/**
* Do the initialization logic
*
* @return void
*/
protected function doInitialize() {
$this->collection = new ArrayCollection(array(
'a',
'b',
'c',
));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractLazyCollection:: |
protected | property | The backed collection to use | |
AbstractLazyCollection:: |
protected | property | ||
AbstractLazyCollection:: |
public | function |
Adds an element at the end of the collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Clears the collection, removing all elements. Overrides Collection:: |
|
AbstractLazyCollection:: |
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:: |
|
AbstractLazyCollection:: |
public | function |
Checks whether the collection contains an element with the specified key/index. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function |
Gets the element of the collection at the current iterator position. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Tests for the existence of an element that satisfies the given predicate. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Returns all the elements of this collection that satisfy the predicate p.
The order of the elements is preserved. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Sets the internal iterator to the first element in the collection and returns this element. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Tests whether the given predicate p holds for all elements of this collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Gets the element at the specified key/index. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function |
Gets all keys/indices of the collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Gets all values of the collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
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:: |
|
AbstractLazyCollection:: |
protected | function | Initialize the collection | |
AbstractLazyCollection:: |
public | function |
Checks whether the collection is empty (contains no elements). Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function | Is the lazy collection already initialized? | |
AbstractLazyCollection:: |
public | function |
Gets the key/index of the element at the current iterator position. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Sets the internal iterator to the last element in the collection and returns this element. Overrides Collection:: |
|
AbstractLazyCollection:: |
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:: |
|
AbstractLazyCollection:: |
public | function |
Moves the internal iterator position to the next element and returns this element. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function | ||
AbstractLazyCollection:: |
public | function |
Partitions this collection in two collections according to a predicate.
Keys are preserved in the resulting collections. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Removes the element at the specified index from the collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Removes the specified element from the collection, if it is found. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Sets an element in the collection at the specified key/index. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Extracts a slice of $length elements starting at position $offset from the Collection. Overrides Collection:: |
|
AbstractLazyCollection:: |
public | function |
Gets a native PHP array representation of the collection. Overrides Collection:: |
|
LazyArrayCollection:: |
protected | function |
Do the initialization logic Overrides AbstractLazyCollection:: |