$conf =
$this->
getDefaultConf($easy);
$this->
applyMethod($easy,
$conf);
$this->
applyHandlerOptions($easy,
$conf);
$this->
applyHeaders($easy,
$conf);
unset($conf['_headers'
]);
// Add handler options from the request configuration options
if (isset($options['curl'
])) { $conf = \
array_replace($conf,
$options['curl'
]);
} $conf[\CURLOPT_HEADERFUNCTION
] =
$this->
createHeaderFn($easy);
$easy->handle =
$this->handles ? \
array_pop($this->handles
) : \
curl_init();
curl_setopt_array($easy->handle,
$conf);
return $easy;
} public function release(EasyHandle
$easy): void
{ $resource =
$easy->handle;
unset($easy->handle
);