You are here

public function CurlPost::__construct in reCAPTCHA 6.2

Same name and namespace in other branches
  1. 8.2 recaptcha-php/src/ReCaptcha/RequestMethod/CurlPost.php \ReCaptcha\RequestMethod\CurlPost::__construct()
  2. 7.2 recaptcha-php/src/ReCaptcha/RequestMethod/CurlPost.php \ReCaptcha\RequestMethod\CurlPost::__construct()

File

recaptcha-php/src/ReCaptcha/RequestMethod/CurlPost.php, line 51

Class

CurlPost
Sends cURL request to the reCAPTCHA service. Note: this requires the cURL extension to be enabled in PHP

Namespace

ReCaptcha\RequestMethod

Code

public function __construct(Curl $curl = null) {
  if (!is_null($curl)) {
    $this->curl = $curl;
  }
  else {
    $this->curl = new Curl();
  }
}