protected function getCurleMap()
{
$map = [];
$constants = get_defined_constants(true);
$curlConstants = $constants['curl'];
foreach ($curlConstants as $constant => $value) {
if (strpos($constant, 'CURLE_') === 0) {
$map[$value] = $constant;
}
}
return $map;
}