Open Monograph Press  3.3.0
AbstractErrorCodeBackoffStrategy.php
1 <?php
2 
3 namespace Guzzle\Plugin\Backoff;
4 
9 {
11  protected static $defaultErrorCodes = array();
12 
14  protected $errorCodes;
15 
20  public function __construct(array $codes = null, BackoffStrategyInterface $next = null)
21  {
22  $this->errorCodes = array_fill_keys($codes ?: static::$defaultErrorCodes, 1);
23  $this->next = $next;
24  }
25 
31  public static function getDefaultFailureCodes()
32  {
33  return static::$defaultErrorCodes;
34  }
35 
36  public function makesDecision()
37  {
38  return true;
39  }
40 }
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy\$defaultErrorCodes
static $defaultErrorCodes
Definition: AbstractErrorCodeBackoffStrategy.php:12
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy\__construct
__construct(array $codes=null, BackoffStrategyInterface $next=null)
Definition: AbstractErrorCodeBackoffStrategy.php:23
Guzzle\Plugin\Backoff\AbstractBackoffStrategy
Definition: AbstractBackoffStrategy.php:12
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy\$errorCodes
$errorCodes
Definition: AbstractErrorCodeBackoffStrategy.php:17
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy\makesDecision
makesDecision()
Definition: AbstractErrorCodeBackoffStrategy.php:39
Guzzle\Plugin\Backoff
Definition: AbstractBackoffStrategy.php:3
Guzzle\Plugin\Backoff\AbstractBackoffStrategy\$next
$next
Definition: AbstractBackoffStrategy.php:18
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
Definition: AbstractErrorCodeBackoffStrategy.php:8
Guzzle\Plugin\Backoff\BackoffStrategyInterface
Definition: BackoffStrategyInterface.php:12
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy\getDefaultFailureCodes
static getDefaultFailureCodes()
Definition: AbstractErrorCodeBackoffStrategy.php:34