Class Guzzle\Plugin\Backoff\CallbackBackoffStrategy

InheritanceGuzzle\Plugin\Backoff\CallbackBackoffStrategy » Guzzle\Plugin\Backoff\AbstractBackoffStrategy
ImplementsGuzzle\Plugin\Backoff\BackoffStrategyInterface

Strategy that will invoke a closure to determine whether or not to retry with a delay

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$callback Closure|array|mixed Callable method to invoke Guzzle\Plugin\Backoff\CallbackBackoffStrategy
$decision bool Whether or not this strategy makes a retry decision Guzzle\Plugin\Backoff\CallbackBackoffStrategy
$next Guzzle\Plugin\Backoff\AbstractBackoffStrategy Next strategy in the chain Guzzle\Plugin\Backoff\AbstractBackoffStrategy

Property Details

$callback protected property

Callable method to invoke

protected Closure|array|mixed $callback null
$decision protected property

Whether or not this strategy makes a retry decision

protected bool $decision null

Method Details

__construct() public method

public void __construct ( $callback, $decision, Guzzle\Plugin\Backoff\BackoffStrategyInterface $next null )
$callback Closure|array|mixed

Callable method to invoke

$decision bool

Set to true if this strategy makes a backoff decision

$next Guzzle\Plugin\Backoff\BackoffStrategyInterface

The optional next strategy

throws Guzzle\Common\Exception\InvalidArgumentException
getDelay() protected method

protected void getDelay ( $retries, Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response null, Guzzle\Http\Exception\HttpException $e null )
$retries
$request
$response
$e
makesDecision() public method

public void makesDecision ( )