Copied!

StreamableInterface

StreamableInterface.php : 16

Methods

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

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

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