Namespace GuzzleHttp\Promise
Coroutine | Creates a promise that is resolved using a generator that yields values or promises (somewhat similar to C#'s async keyword). |
EachPromise | Represents a promise that iterates over many promises and invokes side-effect functions in the process. |
FulfilledPromise | A promise that has been fulfilled. |
Promise | Promises/A+ implementation that avoids recursion when possible. |
RejectedPromise | A promise that has been rejected. |
TaskQueue | A task queue that executes tasks in a FIFO order. |
PromiseInterface | A promise represents the eventual result of an asynchronous operation. |
PromisorInterface | Interface used with classes that return a promise. |
TaskQueueInterface |
AggregateException | Exception thrown when too many errors occur in the some() or any() methods. |
CancellationException | Exception that is set as the reason for a promise that has been cancelled. |
RejectionException | A special exception that is thrown when waiting on a rejected promise. |
all | Given an array of promises, return a promise that is fulfilled when all the items in the array are fulfilled. |
any | Like some(), with 1 as count. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly. |
coroutine | |
each | Given an iterator that yields promises or values, returns a promise that is fulfilled with a null value when the iterator has been consumed or the aggregate promise has been fulfilled or rejected. |
each_limit | Like each, but only allows a certain number of outstanding promises at any given time. |
each_limit_all | Like each_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. |
exception_for | Create an exception for a rejected promise value. |
inspect | Synchronously waits on a promise to resolve and returns an inspection state array. |
inspect_all | Waits on all of the provided promises, but does not unwrap rejected promises as thrown exception. |
is_fulfilled | Returns true if a promise is fulfilled. |
is_rejected | Returns true if a promise is rejected. |
is_settled | Returns true if a promise is fulfilled or rejected. |
iter_for | Returns an iterator for the given value. |
promise_for | Creates a promise for a value if the value is not a promise. |
queue | Get the global task queue used for promise resolution. |
rejection_for | 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. |
settle | Returns a promise that is fulfilled when all of the provided promises have been fulfilled or rejected. |
some | Initiate a competitive race between multiple promises or values (values will become immediately fulfilled promises). |
task | Adds a function to run in the task queue when it is next |
unwrap | Waits on all of the provided promises and returns the fulfilled values. |