/**
* This handler accepts the following options:
*
* - handle_factory: An optional factory used to create curl handles
* - select_timeout: Optional timeout (in seconds) to block before timing
* out while selecting curl handles. Defaults to 1 second.
* - options: An associative array of CURLMOPT_* options and
* corresponding values for curl_multi_setopt()
*/
public function __construct(array
$options =
[]) { $this->factory =
$options['handle_factory'
] ??
new CurlFactory(50
);
if (isset($options['select_timeout'
])) { $this->selectTimeout =
$options['select_timeout'
];
} elseif ($selectTimeout = Utils::
getenv('GUZZLE_CURL_SELECT_TIMEOUT'
)) { @
trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED
);
$this->selectTimeout =
(int) $selectTimeout;
} else { $this->selectTimeout = 1;
} $this->options =
$options['options'
] ??
[];