Пример #1
0
 /**
  * @param  $callback
  * Callback function to be applied to each result.
  *
  * Can be specified as 'my_callback_function'
  * or array($object, 'my_callback_method').
  *
  * Function should take three parameters: $response, $info, $request.
  * $response is response body, $info is additional curl info.
  * $request is the original request
  *
  * @return void
  */
 function __construct($callback = null, $debug_log = false)
 {
     self::$debug_log = $debug_log;
     # writing debug
     //  self::add_debug_msg("# Building"); #1
     # checking if cURL enabled
     /* if(!function_exists('curl_init')) #2
        {
            throw new SuperCurlException("(!) cURL is not enabled");
        }*/
     $this->callback = $callback;
 }