Properties¶
$items¶
AbstractInMemoryCollection.php
:
24
|
|
Methods¶
__construct() ¶
AbstractInMemoryCollection.php
:
29
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$items | array<string|int, mixed> | [] | - |
clear() ¶
MutableArrayMap.php
:
30
|
|
count() ¶
AbstractInMemoryCollection.php
:
49
|
|
Return values
int
exists() ¶
AbstractInMemoryCollection.php
:
81
Tests the existence of an element that satisfies the given predicate.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
filter() ¶
AbstractInMemoryCollection.php
:
57
Returns all the elements of this collection that satisfy the predicate.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
self
forAll() ¶
AbstractInMemoryCollection.php
:
70
Tests whether the given predicate holds for all elements of this collection.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
get() ¶
ArrayMap.php
:
22
Returns value associated with given key.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$key | mixed | - | - |
Return values
TValue
getIterator() ¶
AbstractInMemoryCollection.php
:
44
|
|
Return values
Iterator
has() ¶
ArrayMap.php
:
31
Returns true if the given key is defined within the map.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$key | mixed | - | - |
Return values
bool
isEmpty() ¶
AbstractInMemoryCollection.php
:
34
|
|
Return values
bool
map() ¶
AbstractInMemoryCollection.php
:
65
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$function | Closure | - | - |
Return values
self
set() ¶
MutableArrayMap.php
:
20
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$key | mixed | - | - |
$value | mixed | - | - |
toArray() ¶
AbstractInMemoryCollection.php
:
39
|
|
Return values
array<string|int, TValue>
unset() ¶
MutableArrayMap.php
:
25
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$key | mixed | - | - |
createFrom() ¶
MutableArrayMap.php
:
35
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$items | array<string|int, mixed> | - | - |