1 | <?php |
||
7 | class Client |
||
8 | { |
||
9 | /** |
||
10 | * Contains cURL instance |
||
11 | * |
||
12 | * @access public |
||
13 | */ |
||
14 | public $ch; |
||
15 | |||
16 | /** |
||
17 | * Contains the authentication string |
||
18 | * |
||
19 | * @access protected |
||
20 | */ |
||
21 | protected $secret_token; |
||
22 | |||
23 | protected $grant_token; |
||
24 | |||
25 | /** |
||
26 | * __construct function. |
||
27 | * |
||
28 | * Instantiate object |
||
29 | * |
||
30 | * @access public |
||
31 | * @param string $secret_token |
||
32 | * @param string $grant_token |
||
33 | * @throws Exception |
||
34 | */ |
||
35 | 4 | public function __construct($secret_token = '', $grant_token = '') |
|
57 | |||
58 | /** |
||
59 | * Shutdown function. |
||
60 | * |
||
61 | * Closes the current cURL connection |
||
62 | * |
||
63 | * @access public |
||
64 | */ |
||
65 | public function shutdown() |
||
71 | |||
72 | /** |
||
73 | * authenticate function. |
||
74 | * |
||
75 | * Create a cURL instance with authentication headers |
||
76 | * |
||
77 | * @access public |
||
78 | */ |
||
79 | 4 | protected function authenticate() |
|
106 | } |
||
107 |