Copied!

AssetCollectionInterface

AssetCollectionInterface.php : 22

Methods

publiccontains()

ListInterface.php : 39
public contains(TValue $value) : bool

Parameters

Name Type Default value Description
$value TValue - -

Return values

bool

publicexists()

StreamableInterface.php : 42

Tests the existence of an element that satisfies the given predicate.

public exists(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicfilter()

StreamableInterface.php : 24

Returns all the elements of this collection that satisfy the predicate.

public filter(Closure $predicate) : self

The order of the elements is preserved.

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

self

publicfirst()

ListInterface.php : 25

Return first element of collection.

public first() : TValue

Return values

TValue

Tags
Throws
OutOfBoundsException

if collection is empty

publicforAll()

StreamableInterface.php : 37

Tests whether the given predicate holds for all elements of this collection.

public forAll(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicgetIterator()

CollectionInterface.php : 32
public getIterator() : Iterator

Return values

Iterator

publicisEmpty()

CollectionInterface.php : 22
public isEmpty() : bool

Return values

bool

publiclast()

ListInterface.php : 34

Return last element of collection.

public last() : TValue

Return values

TValue

Tags
Throws
OutOfBoundsException

if collection is empty

publicmap()

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.

public map(Closure $function) : self

Parameters

Name Type Default value Description
$function Closure - -

Return values

self

publictoArray()

CollectionInterface.php : 27
public toArray() : array<string|int, TValue>

Return values

array<string|int, TValue>

publicwithTag()

AssetCollectionInterface.php : 24
public withTag(string $tag[, string|null $value = null ]) : self

Parameters

Name Type Default value Description
$tag string - -
$value string|null null -

Return values

self

publicwithTags()

AssetCollectionInterface.php : 29
public withTags(array<string, string|null> $tags) : self

Parameters

Name Type Default value Description
$tags array<string, string|null> - -

Return values

self