Documentation

UriNormalizerRetryConfig
in package

Container for URL resolution retry settings

Tags
author

zozlak

Table of Contents

Constants

SCALE_CONST  = 'const'
SCALE_MULTI  = 'multi'
SCALE_POWER  = 'power'

Properties

$delay  : float
$number  : int
$on  : array<string|int, mixed>
$scale  : string

Methods

__construct()  : mixed
retry()  : bool
sleep()  : void

Constants

Properties

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
bool

        
On this page

Search results