PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / rmccue / requests / src / Exception / Transport / Curl.php
ameliabooking / vendor / rmccue / requests / src / Exception / Transport Last commit date
Curl.php 6 months ago
Curl.php
81 lines
1 <?php
2 /**
3 * CURL Transport Exception.
4 *
5 * @package Requests\Exceptions
6 */
7
8 namespace AmeliaVendor\WpOrg\Requests\Exception\Transport;
9
10 use AmeliaVendor\WpOrg\Requests\Exception\Transport;
11
12 /**
13 * CURL Transport Exception.
14 *
15 * @package Requests\Exceptions
16 */
17 final class Curl extends Transport {
18
19 const EASY = 'cURLEasy';
20 const MULTI = 'cURLMulti';
21 const SHARE = 'cURLShare';
22
23 /**
24 * cURL error code
25 *
26 * @var integer
27 */
28 protected $code = -1;
29
30 /**
31 * Which type of cURL error
32 *
33 * EASY|MULTI|SHARE
34 *
35 * @var string
36 */
37 protected $type = 'Unknown';
38
39 /**
40 * Clear text error message
41 *
42 * @var string
43 */
44 protected $reason = 'Unknown';
45
46 /**
47 * Create a new exception.
48 *
49 * @param string $message Exception message.
50 * @param string $type Exception type.
51 * @param mixed $data Associated data, if applicable.
52 * @param int $code Exception numerical code, if applicable.
53 */
54 public function __construct($message, $type, $data = null, $code = 0) {
55 if ($type !== null) {
56 $this->type = $type;
57 }
58
59 if ($code !== null) {
60 $this->code = (int) $code;
61 }
62
63 if ($message !== null) {
64 $this->reason = $message;
65 }
66
67 $message = sprintf('%d %s', $this->code, $this->reason);
68 parent::__construct($message, $this->type, $data, $this->code);
69 }
70
71 /**
72 * Get the error message.
73 *
74 * @return string
75 */
76 public function getReason() {
77 return $this->reason;
78 }
79
80 }
81