| Methods |
public
|
count(): int
{@inheritDoc}
|
#
|
public
|
add(mixed $element)
{@inheritDoc}
Returns
we will require a native return type declaration in 3.0
Overriden by
Implements
|
#
|
public
|
clear()
{@inheritDoc}
|
#
|
public
|
contains(mixed $element)
{@inheritDoc}
Returns
TRUE if the collection contains the element, FALSE otherwise.
Overriden by
Implements
|
#
|
public
|
isEmpty()
{@inheritDoc}
Returns
TRUE if the collection is empty, FALSE otherwise.
Overriden by
Implements
|
#
|
public
|
remove(string|int $key)
{@inheritDoc}
Returns
The removed element or NULL, if the collection did not contain the element.
Overriden by
Implements
|
#
|
public
|
removeElement(mixed $element)
{@inheritDoc}
Returns
TRUE if this collection contained the specified element, FALSE otherwise.
Overriden by
Implements
|
#
|
public
|
containsKey(string|int $key)
{@inheritDoc}
Returns
TRUE if the collection contains an element with the specified key/index,
FALSE otherwise.
Overriden by
Implements
|
#
|
public
|
get(string|int $key)
{@inheritDoc}
|
#
|
public
|
getKeys()
{@inheritDoc}
Returns
The keys/indices of the collection, in the order of the corresponding
elements in the collection.
Implements
|
#
|
public
|
getValues()
{@inheritDoc}
Returns
The values of all elements in the collection, in the
order they appear in the collection.
Implements
|
#
|
public
|
set(string|int $key, mixed $value)
{@inheritDoc}
|
#
|
public
|
toArray()
{@inheritDoc}
|
#
|
public
|
first()
{@inheritDoc}
|
#
|
public
|
last()
{@inheritDoc}
|
#
|
public
|
key()
{@inheritDoc}
|
#
|
public
|
current()
{@inheritDoc}
|
#
|
public
|
next()
{@inheritDoc}
|
#
|
public
|
exists(Closure $p)
{@inheritDoc}
Returns
TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
Implements
|
#
|
public
|
findFirst(Closure $p)
{@inheritDoc}
Returns
The first element respecting the predicate,
null if no element respects the predicate.
Implements
|
#
|
public
|
filter(Closure $p)
{@inheritDoc}
Returns
A collection with the results of the filter operation.
Implements
|
#
|
public
|
forAll(Closure $p)
{@inheritDoc}
Returns
TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.
Implements
|
#
|
public
|
map(Closure $func)
{@inheritDoc}
|
#
|
public
|
reduce(Closure $func, mixed $initial = null)
{@inheritDoc}
|
#
|
public
|
partition(Closure $p)
{@inheritDoc}
Returns
An array with two elements. The first element contains the collection
of elements where the predicate returned TRUE, the second element
contains the collection of elements where the predicate returned FALSE.
Implements
|
#
|
public
|
indexOf<TMaybeContained>(mixed $element)
{@inheritDoc}
Returns
The key/index of the element or FALSE if the element was not found.
Implements
|
#
|
public
|
slice(int $offset, int|null $length = null)
{@inheritDoc}
Parameters
| $offset |
The offset to start from.
|
| $length |
The maximum number of elements to return, or null for no limit.
|
Overriden by
Implements
|
#
|
public
|
getIterator(): Traversable<int|string, mixed>
{@inheritDoc}
|
#
|
public
|
offsetExists(TKey $offset): bool
{@inheritDoc}
|
#
|
public
|
offsetGet(TKey $offset): T|null
{@inheritDoc}
|
#
|
public
|
offsetSet(TKey|null $offset, T $value): void
{@inheritDoc}
|
#
|
public
|
offsetUnset(TKey $offset): void
|
#
|
public
|
isInitialized(): bool
Is the lazy collection already initialized?
Is the lazy collection already initialized?
|
#
|
protected
|
initialize(): void
Initialize the collection
Initialize the collection
Overriden by
|
#
|
abstract
protected
|
doInitialize(): void
Do the initialization logic
Do the initialization logic
Implemented by
|
#
|