Пример #1
0
 /**
  * Set your own custom cURL options for when making requests.
  *
  * For a list of available cURL options go to: http://php.net/curl_setopt
  * @param array $options An array of cURL option key value pairs.
  */
 public static function setCurlOptions($options)
 {
     try {
         if (!is_array($options)) {
             $optionsVarType = gettype($options);
             throw new BattleNetAPI_Exception('The method setCurlOptions() expects the parameter $options to be an array, ' . $optionsVarType . ' given.');
         }
         self::$curlOptions = self::$curlOptions + $options;
     } catch (BattleNetAPI_Exception $exception) {
         $exception->showMessage();
     }
 }