Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
GuzzleHttp\Promise\Create Class Reference

Static Public Member Functions

static exceptionFor ($reason)
 Create an exception for a rejected promise value.
 
static iterFor ($value)
 Returns an iterator for the given value.
 
static promiseFor ($value)
 
static rejectionFor ($reason)
 Creates a rejected promise for a reason if the reason is not a promise.
 

Member Function Documentation

◆ exceptionFor()

static GuzzleHttp\Promise\Create::exceptionFor ( $reason)
static

Create an exception for a rejected promise value.

Parameters
mixed$reason
Return values
Exception|Throwable

◆ iterFor()

static GuzzleHttp\Promise\Create::iterFor ( $value)
static

Returns an iterator for the given value.

Parameters
mixed$value
Return values
Iterator

◆ rejectionFor()

static GuzzleHttp\Promise\Create::rejectionFor ( $reason)
static

Creates a rejected promise for a reason if the reason is not a promise.

If the provided reason is a promise, then it is returned as-is.

Parameters
mixed$reasonPromise or reason.
Return values
PromiseInterface

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