Promises/A+ implementation that avoids recursion when possible.
- see https://promisesaplus.com/
- final
CloneableInstantiable
| Constants |
| Methods |
public __construct(?callable $waitFn = NULL, ?callable $cancelFn = NULL)
|
| public cancel() : void |
| public getState() : string |
| public otherwise(callable $onRejected) : GuzzleHttp |
| public reject( $reason) : void |
| public resolve( $value) : void |
| public then(?callable $onFulfilled = NULL, ?callable $onRejected = NULL) : GuzzleHttp |
| public wait(bool $unwrap = true) |
| Properties |
| private $cancelFn = NULL |
| private $handlers = [] |
| private $result = NULL |
| private $state = 'pending' |
| private $waitFn = NULL |
| private $waitList = NULL |
| Methods |
| private static callHandler(int $index, $value, array $handler) : void Call a stack of handlers using a specific callback index and value.
|
| private invokeWaitFn() : void |
| private invokeWaitList() : void |
| private settle(string $state, $value) : void |
| private waitIfPending() : void |
| Methods |
| private static callHandler(int $index, $value, array $handler) : void Call a stack of handlers using a specific callback index and value.
|