1 | <?php |
||
12 | class Client |
||
13 | { |
||
14 | /** |
||
15 | * Contains cURL instance |
||
16 | * |
||
17 | * @access public |
||
18 | */ |
||
19 | public $ch; |
||
20 | |||
21 | /** |
||
22 | * Contains the authentication string |
||
23 | * |
||
24 | * @access protected |
||
25 | */ |
||
26 | protected $auth_string; |
||
27 | |||
28 | /** |
||
29 | * Contains the headers |
||
30 | * |
||
31 | * @access protected |
||
32 | */ |
||
33 | protected $headers = array(); |
||
34 | |||
35 | /** |
||
36 | * __construct function. |
||
37 | * |
||
38 | * Instantiate object |
||
39 | * |
||
40 | * @access public |
||
41 | */ |
||
42 | 10 | public function __construct($auth_string = '', $additional_headers = array()) |
|
72 | |||
73 | /** |
||
74 | * Shutdown function. |
||
75 | * |
||
76 | * Closes the current cURL connection |
||
77 | * |
||
78 | * @access public |
||
79 | */ |
||
80 | public function shutdown() |
||
86 | |||
87 | /** |
||
88 | * Set additional headers for cURL request. |
||
89 | * |
||
90 | * @param string[] $additional_headers |
||
91 | * @access public |
||
92 | * @return bool |
||
93 | */ |
||
94 | 10 | public function setHeaders($additional_headers) |
|
101 | } |
||
102 |