Lines Matching refs:options
59 * @param array $options
63 public function __invoke(RequestInterface $request, array $options) argument
65 if (!isset($options['retries'])) {
66 $options['retries'] = 0;
70 return $fn($request, $options)
72 $this->onFulfilled($request, $options),
73 $this->onRejected($request, $options)
82 private function onFulfilled(RequestInterface $req, array $options) argument
84 return function ($value) use ($req, $options) {
87 $options['retries'],
94 return $this->doRetry($req, $options, $value);
103 private function onRejected(RequestInterface $req, array $options) argument
105 return function ($reason) use ($req, $options) {
108 $options['retries'],
115 return $this->doRetry($req, $options);
122 …private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = … argument
124 $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
126 return $this($request, $options);