PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / vendor / paypal / paypalhttp / lib / PayPalHttp / Curl.php

Curl.php in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at vendor/paypal/paypalhttp/lib/PayPalHttp/Curl.php

58 lines 929 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PayPalHttp;
4
5 /**
6 * Class Curl
7 * @package PayPalHttp
8 *
9 * Curl wrapper used by HttpClient to make curl requests.
10 * @see HttpClient
11 */
12 class Curl
13 {
14 protected $curl;
15
16 public function __construct($curl = NULL)
17 {
18
19 if (is_null($curl))
20 {
21 $curl = curl_init();
22 }
23 $this->curl = $curl;
24 }
25
26 public function setOpt($option, $value)
27 {
28 curl_setopt($this->curl, $option, $value);
29 return $this;
30 }
31
32 public function close()
33 {
34 curl_close($this->curl);
35 return $this;
36 }
37
38 public function exec()
39 {
40 return curl_exec($this->curl);
41 }
42
43 public function errNo()
44 {
45 return curl_errno($this->curl);
46 }
47
48 public function getInfo($option)
49 {
50 return curl_getinfo($this->curl, $option);
51 }
52
53 public function error()
54 {
55 return curl_error($this->curl);
56 }
57 }
58