Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
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
callable$onFulfilled
callable$onRejected
Return values
PromiseInterface

◆ 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
callable$onFulfilled
Return values
PromiseInterface

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