Open Journal Systems  3.3.0
Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy Class Reference
Inheritance diagram for Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy:
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy Guzzle\Plugin\Backoff\AbstractBackoffStrategy Guzzle\Plugin\Backoff\BackoffStrategyInterface

Public Member Functions

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

Protected Member Functions

 getDelay ($retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
static getDefaultFailureCodes ()
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
 $errorCodes
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 $next
 
- Static Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
static $defaultErrorCodes = array()
 

Detailed Description

Strategy used to retry HTTP requests when the response's reason phrase matches one of the registered phrases.

Definition at line 12 of file ReasonPhraseBackoffStrategy.php.

Member Function Documentation

◆ getDelay()

Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy::getDelay (   $retries,
RequestInterface  $request,
Response  $response = null,
HttpException  $e = null 
)
protected

Implement the concrete strategy

Parameters
int$retriesNumber of retries of the request
RequestInterface$requestRequest that was sent
Response$responseResponse that was received. Note that there may not be a response
HttpException$eException that was encountered if any
Returns
bool|int|null Returns false to not retry or the number of seconds to delay between retries. Return true or null to defer to the next strategy if available, and if not, return 0.

Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.

Definition at line 19 of file ReasonPhraseBackoffStrategy.php.

◆ makesDecision()

Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy::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\AbstractErrorCodeBackoffStrategy.

Definition at line 14 of file ReasonPhraseBackoffStrategy.php.


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