Open Journal Systems  3.3.0
LinearBackoffStrategy.php
1 <?php
2 
3 namespace Guzzle\Plugin\Backoff;
4 
8 
15 {
17  protected $step;
18 
22  public function __construct($step = 1)
23  {
24  $this->step = $step;
25  }
26 
27  public function makesDecision()
28  {
29  return false;
30  }
31 
32  protected function getDelay($retries, RequestInterface $request, Response $response = null, HttpException $e = null)
33  {
34  return $retries * $this->step;
35  }
36 }
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\Http\Message\Response
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php:17
Guzzle\Plugin\Backoff\LinearBackoffStrategy\__construct
__construct($step=1)
Definition: LinearBackoffStrategy.php:25
Guzzle\Plugin\Backoff
Definition: AbstractBackoffStrategy.php:3
Guzzle\Plugin\Backoff\LinearBackoffStrategy\$step
$step
Definition: LinearBackoffStrategy.php:20
Guzzle\Plugin\Backoff\LinearBackoffStrategy\getDelay
getDelay($retries, RequestInterface $request, Response $response=null, HttpException $e=null)
Definition: LinearBackoffStrategy.php:35
Guzzle\Plugin\Backoff\LinearBackoffStrategy\makesDecision
makesDecision()
Definition: LinearBackoffStrategy.php:30
Guzzle\Plugin\Backoff\LinearBackoffStrategy
Definition: LinearBackoffStrategy.php:14