Open Monograph Press  3.3.0
ExponentialBackoffStrategy.php
1 <?php
2 
3 namespace Guzzle\Plugin\Backoff;
4 
8 
15 {
16  public function makesDecision()
17  {
18  return false;
19  }
20 
21  protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null)
22  {
23  return (int) pow(2, $retries);
24  }
25 }
Guzzle\Http\Message\RequestInterface
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestInterface.php:16
Guzzle\Plugin\Backoff\AbstractBackoffStrategy
Definition: AbstractBackoffStrategy.php:12
Guzzle\Http\Exception\HttpException
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php:10
Guzzle\Plugin\Backoff\ExponentialBackoffStrategy\makesDecision
makesDecision()
Definition: ExponentialBackoffStrategy.php:16
Guzzle\Http\Message\Response
Definition: paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php:17
Guzzle\Plugin\Backoff
Definition: AbstractBackoffStrategy.php:3
Guzzle\Plugin\Backoff\ExponentialBackoffStrategy
Definition: ExponentialBackoffStrategy.php:14
Guzzle\Plugin\Backoff\ExponentialBackoffStrategy\getDelay
getDelay($retries, RequestInterface $request, Response $response=null, HttpException $e=null)
Definition: ExponentialBackoffStrategy.php:21