Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
GuzzleHttp\Promise\Each Class Reference

Static Public Member Functions

static of ( $iterable, callable $onFulfilled=null, callable $onRejected=null)
 
static ofLimit ( $iterable, $concurrency, callable $onFulfilled=null, callable $onRejected=null)
 Like of, but only allows a certain number of outstanding promises at any given time.
 
static ofLimitAll ( $iterable, $concurrency, callable $onFulfilled=null)
 Like limit, but ensures that no promise in the given $iterable argument is rejected.
 

Member Function Documentation

◆ ofLimit()

static GuzzleHttp\Promise\Each::ofLimit ( $iterable,
$concurrency,
callable $onFulfilled = null,
callable $onRejected = null )
static

Like of, but only allows a certain number of outstanding promises at any given time.

$concurrency may be an integer or a function that accepts the number of pending promises and returns a numeric concurrency limit value to allow for dynamic a concurrency size.

Parameters
mixed$iterable
int | callable$concurrency

◆ ofLimitAll()

static GuzzleHttp\Promise\Each::ofLimitAll ( $iterable,
$concurrency,
callable $onFulfilled = null )
static

Like limit, but ensures that no promise in the given $iterable argument is rejected.

If any promise is rejected, then the aggregate promise is rejected with the encountered rejection.

Parameters
mixed$iterable
int | callable$concurrency

The documentation for this class was generated from the following file: