diff options
Diffstat (limited to 'vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php')
-rw-r--r-- | vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php b/vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php index 08e6eaf..9d5ce8f 100644 --- a/vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php +++ b/vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php @@ -1,57 +1,57 @@ -<?php - -namespace PayPalHttp; - -/** - * Class Curl - * @package PayPalHttp - * - * Curl wrapper used by HttpClient to make curl requests. - * @see HttpClient - */ -class Curl -{ - protected $curl; - - public function __construct($curl = NULL) - { - - if (is_null($curl)) - { - $curl = curl_init(); - } - $this->curl = $curl; - } - - public function setOpt($option, $value) - { - curl_setopt($this->curl, $option, $value); - return $this; - } - - public function close() - { - curl_close($this->curl); - return $this; - } - - public function exec() - { - return curl_exec($this->curl); - } - - public function errNo() - { - return curl_errno($this->curl); - } - - public function getInfo($option) - { - return curl_getinfo($this->curl, $option); - } - - public function error() - { - return curl_error($this->curl); - } -} +<?php
+
+namespace PayPalHttp;
+
+/**
+ * Class Curl
+ * @package PayPalHttp
+ *
+ * Curl wrapper used by HttpClient to make curl requests.
+ * @see HttpClient
+ */
+class Curl
+{
+ protected $curl;
+
+ public function __construct($curl = NULL)
+ {
+
+ if (is_null($curl))
+ {
+ $curl = curl_init();
+ }
+ $this->curl = $curl;
+ }
+
+ public function setOpt($option, $value)
+ {
+ curl_setopt($this->curl, $option, $value);
+ return $this;
+ }
+
+ public function close()
+ {
+ curl_close($this->curl);
+ return $this;
+ }
+
+ public function exec()
+ {
+ return curl_exec($this->curl);
+ }
+
+ public function errNo()
+ {
+ return curl_errno($this->curl);
+ }
+
+ public function getInfo($option)
+ {
+ return curl_getinfo($this->curl, $option);
+ }
+
+ public function error()
+ {
+ return curl_error($this->curl);
+ }
+}
|