UriNormalizerRetryConfig
in package
Container for URL resolution retry settings
Tags
Table of Contents
Constants
- SCALE_CONST = 'const'
- SCALE_MULTI = 'multi'
- SCALE_POWER = 'power'
Properties
Methods
- __construct() : mixed
- retry() : bool
- sleep() : void
Constants
SCALE_CONST
public
mixed
SCALE_CONST
= 'const'
SCALE_MULTI
public
mixed
SCALE_MULTI
= 'multi'
SCALE_POWER
public
mixed
SCALE_POWER
= 'power'
Properties
$delay
public
float
$delay
= 0
$number
public
int
$number
= 0
$on
public
array<string|int, mixed>
$on
= [429, 502, 503, 504]
$scale
public
string
$scale
= self::SCALE_CONST
Methods
__construct()
public
__construct([int $number = 0 ][, float $delay = 0 ][, string $scale = self::SCALE_CONST ][, array<string|int, int> $on = [429, 502, 503, 504] ]) : mixed
Parameters
- $number : int = 0
- $delay : float = 0
- $scale : string = self::SCALE_CONST
- $on : array<string|int, int> = [429, 502, 503, 504]
retry()
public
retry(ResponseInterface|ClientExceptionInterface $response, int $attempt, RequestInterface $request) : bool
Parameters
- $response : ResponseInterface|ClientExceptionInterface
- $attempt : int
- $request : RequestInterface
Return values
boolsleep()
public
sleep(int $attempt) : void
Parameters
- $attempt : int