Lines Matching refs:options
26 * @param array $options Request transfer options.
30 public function __invoke(RequestInterface $request, array $options) argument
33 if (isset($options['delay'])) {
34 usleep($options['delay'] * 1000);
37 $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
51 $options,
52 $this->createStream($request, $options),
69 $this->invokeStats($options, $request, $startTime, null, $e);
76 array $options, argument
82 if (isset($options['on_stats'])) {
90 call_user_func($options['on_stats'], $stats);
96 array $options, argument
107 list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
112 $sink = $this->createSink($stream, $options);
117 if (isset($options['on_headers'])) {
119 $options['on_headers']($response);
137 $this->invokeStats($options, $request, $startTime, $response, null);
142 private function createSink(StreamInterface $stream, array $options) argument
144 if (!empty($options['stream'])) {
148 $sink = isset($options['sink'])
149 ? $options['sink']
157 private function checkDecode(array $options, array $headers, $stream) argument
160 if (!empty($options['decode_content'])) {
259 private function createStream(RequestInterface $request, array $options) argument
275 if (!isset($options['verify'])) {
276 $options['verify'] = true;
282 if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
286 if (!empty($options)) {
287 foreach ($options as $key => $value) {
295 if (isset($options['stream_context'])) {
296 if (!is_array($options['stream_context'])) {
301 $options['stream_context']
306 if (isset($options['auth'])
307 && is_array($options['auth'])
308 && isset($options['auth'][2])
309 && 'ntlm' == $options['auth'][2]
314 $uri = $this->resolveHost($request, $options);
323 function () use ($uri, &$http_response_header, $context, $options) {
327 if (isset($options['read_timeout'])) {
328 $readTimeout = $options['read_timeout'];
339 private function resolveHost(RequestInterface $request, array $options) argument
343 … if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
344 if ('v4' === $options['force_ip_resolve']) {
356 } elseif ('v6' === $options['force_ip_resolve']) {
408 private function add_proxy(RequestInterface $request, &$options, $value, &$params) argument
411 $options['http']['proxy'] = $value;
421 $options['http']['proxy'] = $value[$scheme];
427 private function add_timeout(RequestInterface $request, &$options, $value, &$params) argument
430 $options['http']['timeout'] = $value;
434 private function add_verify(RequestInterface $request, &$options, $value, &$params) argument
440 $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
443 $options['ssl']['cafile'] = $value;
448 $options['ssl']['verify_peer'] = false;
449 $options['ssl']['verify_peer_name'] = false;
455 $options['ssl']['verify_peer'] = true;
456 $options['ssl']['verify_peer_name'] = true;
457 $options['ssl']['allow_self_signed'] = false;
460 private function add_cert(RequestInterface $request, &$options, $value, &$params) argument
463 $options['ssl']['passphrase'] = $value[1];
471 $options['ssl']['local_cert'] = $value;
474 private function add_progress(RequestInterface $request, &$options, $value, &$params) argument
486 private function add_debug(RequestInterface $request, &$options, $value, &$params) argument