Construct a new CurlHandle object that wraps a cURL handle
resource $handle Configured cURL handle resource:
Collection|array $options Curl options to use with the handle:
public function __construct($handle, $options) {
if (!is_resource($handle)) {
throw new InvalidArgumentException('Invalid handle provided');
}
if (is_array($options)) {
$this->options = new Collection($options);
}
elseif ($options instanceof Collection) {
$this->options = $options;
}
else {
throw new InvalidArgumentException('Expected array or Collection');
}
$this->handle = $handle;
}