Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • AbstractBackoffStrategy
  • AbstractErrorCodeBackoffStrategy
  • BackoffLogger
  • BackoffPlugin
  • CallbackBackoffStrategy
  • ConstantBackoffStrategy
  • CurlBackoffStrategy
  • ExponentialBackoffStrategy
  • HttpBackoffStrategy
  • LinearBackoffStrategy
  • ReasonPhraseBackoffStrategy
  • TruncatedBackoffStrategy

Interfaces

  • BackoffStrategyInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class CallbackBackoffStrategy

Strategy that will invoke a closure to determine whether or not to retry with a delay

Guzzle\Plugin\Backoff\AbstractBackoffStrategy implements Guzzle\Plugin\Backoff\BackoffStrategyInterface
Extended by Guzzle\Plugin\Backoff\CallbackBackoffStrategy
Namespace: Guzzle\Plugin\Backoff
Located at Guzzle/Plugin/Backoff/CallbackBackoffStrategy.php
Methods summary
public
# __construct( Closure|array|mixed $callback, boolean $decision, Guzzle\Plugin\Backoff\BackoffStrategyInterface $next = null )

Parameters

$callback
Closure|array|mixed
$callback Callable method to invoke
$decision
boolean
$decision Set to true if this strategy makes a backoff decision
$next
Guzzle\Plugin\Backoff\BackoffStrategyInterface
$next The optional next strategy

Throws

Guzzle\Common\Exception\InvalidArgumentException
public boolean
# makesDecision( )

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

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

Returns

boolean
protected boolean|integer|null
# getDelay( integer $retries, Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response = null, Guzzle\Http\Exception\HttpException $e = null )

Implement the concrete strategy

Implement the concrete strategy

Parameters

$retries
integer
$retries Number of retries of the request
$request
Guzzle\Http\Message\RequestInterface
$request Request that was sent
$response
Guzzle\Http\Message\Response
$response Response that was received. Note that there may not be a response
$e
Guzzle\Http\Exception\HttpException
$e Exception that was encountered if any

Returns

boolean|integer|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.
Methods inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
getBackoffPeriod(), getNext(), setNext()
Properties summary
protected Closure|array|mixed $callback
#

Callable method to invoke

Callable method to invoke

protected boolean $decision
#

Whether or not this strategy makes a retry decision

Whether or not this strategy makes a retry decision

Properties inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
$next
php-coveralls API documentation generated by ApiGen 2.8.0