protected function perform(callable $callback, ...$params)
  {
    $result = $callback($this->curl, ...$params);
    if(curl_errno($this->curl) !== CURLE_OK)
      throw new CurlException($this->curl);

    if($result === false)
      throw new CurlException("Unable to perform $callback - unknown error.");

    return $result;
  }
protected function perform(callable $callback, ...$params)
  {
    $result = $callback($this->curl, ...$params);
    if(curl_errno($this->curl) !== CURLE_OK)
      throw new CurlException($this->curl);

    if($result === false)
      throw new CurlException("Unable to perform $callback - unknown error.");

    return $result;
  }
protected function perform ( callable $ callback , ... $ params ) { $ result = $ callback ( $ this -> curl , ... $ params ) ; if ( curl_errno ( $ this -> curl ) !== CURLE_OK ) throw new CurlException ( $ this -> curl ) ; if ( $ result === false ) throw new CurlException ( "Unable to perform $callback - unknown error." ) ; return $ result ; }
The curl wrapper itself.

Perfroms an actual call to the cURL library and judges the result.

An exception is thrown if results are found inadequate.

@param callable $callback The name of curl_* function to call.
@param mixed ...$params Arguments to the call.
@return mixed The results of the call.
The curl wrapper itself .