public static function CurlHandle::parseCurlConfig

Parse the config and replace curl.* configurators into the constant based values so it can be used elsewhere

Parameters

array|Collection $config The configuration we want to parse:

Return value

array

1 call to CurlHandle::parseCurlConfig()
Client::prepareRequest in drupal/core/vendor/guzzle/http/Guzzle/Http/Client.php
Prepare a request to be sent from the Client by adding client specific behaviors and properties to the request.

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlHandle.php, line 451

Class

CurlHandle
Immutable wrapper for a cURL handle

Namespace

Guzzle\Http\Curl

Code

public static function parseCurlConfig($config) {
  $curlOptions = array();
  foreach ($config as $key => $value) {
    if (!is_numeric($key) && defined($key)) {

      // Convert constants represented as string to constant int values
      $key = constant($key);
    }
    $curlOptions[$key] = is_string($value) && defined($value) ? constant($value) : $value;
  }
  return $curlOptions;
}