Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

CloneableInstantiable
Methods
public __construct(callable $decider, callable $nextHandler, ?callable $delay = NULL)
 


    public __invoke(Psr\Http\Message\RequestInterface $request, array $options)
     


    • return PromiseInterface
    public static exponentialDelay( $retries)
     
    Default exponential backoff delay function.

    • return int milliseconds.
    Properties
    private $decider
     


    • var callable
    private $delay
     


    • var callable
    private $nextHandler
     


    • var callable
    Methods
    private doRetry(Psr\Http\Message\RequestInterface $request, array $options, ?Psr\Http\Message\ResponseInterface $response = NULL)
     


    • return self
    private onFulfilled(Psr\Http\Message\RequestInterface $req, array $options)
     
    Execute fulfilled closure

    • return mixed
    private onRejected(Psr\Http\Message\RequestInterface $req, array $options)
     
    Execute rejected closure

    • return callable
    Methods
    public static exponentialDelay( $retries)
     
    Default exponential backoff delay function.

    • return int milliseconds.
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only