You are here

class Curl in reCAPTCHA 6.2

Same name and namespace in other branches
  1. 8.2 recaptcha-php/src/ReCaptcha/RequestMethod/Curl.php \ReCaptcha\RequestMethod\Curl
  2. 7.2 recaptcha-php/src/ReCaptcha/RequestMethod/Curl.php \ReCaptcha\RequestMethod\Curl

Convenience wrapper around the cURL functions to allow mocking.

Hierarchy

  • class \ReCaptcha\RequestMethod\Curl

Expanded class hierarchy of Curl

File

recaptcha-php/src/ReCaptcha/RequestMethod/Curl.php, line 32

Namespace

ReCaptcha\RequestMethod
View source
class Curl {

  /**
   * @see http://php.net/curl_init
   * @param string $url
   * @return resource cURL handle
   */
  public function init($url = null) {
    return curl_init($url);
  }

  /**
   * @see http://php.net/curl_setopt_array
   * @param resource $ch
   * @param array $options
   * @return bool
   */
  public function setoptArray($ch, array $options) {
    return curl_setopt_array($ch, $options);
  }

  /**
   * @see http://php.net/curl_exec
   * @param resource $ch
   * @return mixed
   */
  public function exec($ch) {
    return curl_exec($ch);
  }

  /**
   * @see http://php.net/curl_close
   * @param resource $ch
   */
  public function close($ch) {
    curl_close($ch);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Curl::close public function
Curl::exec public function
Curl::init public function
Curl::setoptArray public function