AssetCollectionInterface
AssetCollectionInterface.php
:
22
Extends
ListInterface, StreamableInterface
Methods¶
contains() ¶
ListInterface.php
:
39
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$value | TValue | - | - |
Return values
bool
exists() ¶
StreamableInterface.php
:
42
Tests the existence of an element that satisfies the given predicate.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
filter() ¶
StreamableInterface.php
:
24
Returns all the elements of this collection that satisfy the predicate.
|
|
The order of the elements is preserved.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
self
first() ¶
ListInterface.php
:
25
Return first element of collection.
|
|
Return values
TValue
Tags
forAll() ¶
StreamableInterface.php
:
37
Tests whether the given predicate holds for all elements of this collection.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
getIterator() ¶
CollectionInterface.php
:
32
|
|
Return values
Iterator
isEmpty() ¶
CollectionInterface.php
:
22
|
|
Return values
bool
last() ¶
ListInterface.php
:
34
Return last element of collection.
|
|
Return values
TValue
Tags
map() ¶
StreamableInterface.php
:
32
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
toArray() ¶
CollectionInterface.php
:
27
|
|
Return values
array<string|int, TValue>
withTag() ¶
AssetCollectionInterface.php
:
24
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$tag | string | - | - |
$value | string|null | null | - |
Return values
self
withTags() ¶
AssetCollectionInterface.php
:
29
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$tags | array<string, string|null> | - | - |
Return values
self