Open Monograph Press  3.3.0
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy Class Reference
Inheritance diagram for Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy:
Guzzle\Plugin\Backoff\AbstractBackoffStrategy Guzzle\Plugin\Backoff\BackoffStrategyInterface Guzzle\Plugin\Backoff\CurlBackoffStrategy Guzzle\Plugin\Backoff\HttpBackoffStrategy Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy

Public Member Functions

 __construct (array $codes=null, BackoffStrategyInterface $next=null)
 
 makesDecision ()
 
- Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 getBackoffPeriod ( $retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 
 getNext ()
 
 setNext (AbstractBackoffStrategy $next)
 

Static Public Member Functions

static getDefaultFailureCodes ()
 

Protected Attributes

 $errorCodes
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 $next
 

Static Protected Attributes

static $defaultErrorCodes = array()
 

Additional Inherited Members

- Protected Member Functions inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 getDelay ( $retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 

Detailed Description

Strategy used to retry when certain error codes are encountered

Definition at line 8 of file AbstractErrorCodeBackoffStrategy.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy::__construct ( array  $codes = null,
BackoffStrategyInterface  $next = null 
)
Parameters
array$codesArray of codes that should be retried
BackoffStrategyInterface$nextThe optional next strategy

Definition at line 23 of file AbstractErrorCodeBackoffStrategy.php.

References Guzzle\Plugin\Backoff\AbstractBackoffStrategy\$next.

Member Function Documentation

◆ getDefaultFailureCodes()

static Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy::getDefaultFailureCodes ( )
static

◆ makesDecision()

Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy::makesDecision ( )

Check if the strategy does filtering and makes decisions on whether or not to retry.

Strategies that return false will never retry if all of the previous strategies in a chain defer on a backoff decision.

Returns
bool

Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.

Reimplemented in Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy.

Definition at line 39 of file AbstractErrorCodeBackoffStrategy.php.

Field Documentation

◆ $defaultErrorCodes

Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy::$defaultErrorCodes = array()
staticprotected

Default cURL errors to retry

Definition at line 12 of file AbstractErrorCodeBackoffStrategy.php.

◆ $errorCodes

array Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy::$errorCodes
protected

Definition at line 17 of file AbstractErrorCodeBackoffStrategy.php.


The documentation for this class was generated from the following file: