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
 1: <?php
 2: 
 3: namespace Guzzle\Plugin\Backoff;
 4: 
 5: use Guzzle\Http\Message\RequestInterface;
 6: use Guzzle\Http\Message\Response;
 7: use Guzzle\Http\Exception\HttpException;
 8: 
 9: /**
10:  * Strategy to determine if a request should be retried and how long to delay between retries
11:  */
12: interface BackoffStrategyInterface
13: {
14:     /**
15:      * Get the amount of time to delay in seconds before retrying a request
16:      *
17:      * @param int              $retries  Number of retries of the request
18:      * @param RequestInterface $request  Request that was sent
19:      * @param Response         $response Response that was received. Note that there may not be a response
20:      * @param HttpException    $e        Exception that was encountered if any
21:      *
22:      * @return bool|int Returns false to not retry or the number of seconds to delay between retries
23:      */
24:     public function getBackoffPeriod(
25:         $retries,
26:         RequestInterface $request,
27:         Response $response = null,
28:         HttpException $e = null
29:     );
30: }
31: 
php-coveralls API documentation generated by ApiGen 2.8.0