Promises/A+ implementation that avoids recursion when possible.

CloneableInstantiable
ImplementsGuzzleHttp\Promise\PromiseInterface
Constants
public GuzzleHttp\Promise\PromiseInterface::FULFILLED = 'fulfilled'
public GuzzleHttp\Promise\PromiseInterface::PENDING = 'pending'
public GuzzleHttp\Promise\PromiseInterface::REJECTED = 'rejected'
Methods
public __construct(?callable $waitFn = NULL, ?callable $cancelFn = NULL)
 
    public cancel()
    public getState()
    public otherwise(callable $onRejected)
    public reject( $reason)
    public resolve( $value)
    public then(?callable $onFulfilled = NULL, ?callable $onRejected = NULL)
    public wait( $unwrap = true)
    Properties
    private $cancelFn
    private $handlers
    private $result
    private $state
    private $waitFn
    private $waitList
    Methods
    private static callHandler( $index, $value, array $handler)
     

    Call a stack of handlers using a specific callback index and value.

    • return array Returns the next group to resolve.
    private invokeWaitFn()
    private invokeWaitList()
    private settle( $state, $value)
    private waitIfPending()
    Methods
    private static callHandler( $index, $value, array $handler)
     

    Call a stack of handlers using a specific callback index and value.

    • return array Returns the next group to resolve.
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only