PluginChain
in package
FinalYes
Table of Contents
Properties
- $clientCallable : callable(RequestInterface): Promise
- $maxRestarts : int
- $plugins : array<string|int, Plugin>
- $restarts : int
Methods
- __construct() : mixed
- __invoke() : Promise
- createChain() : callable
Properties
$clientCallable
private
callable(RequestInterface): Promise
$clientCallable
$maxRestarts
private
int
$maxRestarts
$plugins
private
array<string|int, Plugin>
$plugins
$restarts
private
int
$restarts
= 0
Methods
__construct()
public
__construct(array<string|int, Plugin> $plugins, callable(RequestInterface): Promise $clientCallable[, array{'max_restarts'?: int} $options = [] ]) : mixed
Parameters
- $plugins : array<string|int, Plugin>
-
A plugin chain
- $clientCallable : callable(RequestInterface): Promise
-
Callable making the HTTP call
- $options : array{'max_restarts'?: int} = []
__invoke()
public
__invoke(RequestInterface $request) : Promise
Parameters
- $request : RequestInterface
Return values
PromisecreateChain()
private
createChain() : callable