1 | <?php |
||
7 | class Curl implements ClientInterface |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $server; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $version; |
||
14 | |||
15 | /** @var LoggerInterface */ |
||
16 | protected $logger; |
||
17 | |||
18 | /** @var float */ |
||
19 | protected $timeout; |
||
20 | |||
21 | /** |
||
22 | * @param string $server |
||
23 | * @param string $apiVersion |
||
24 | */ |
||
25 | public function __construct($server, $apiVersion) |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function setTimeout($timeout) |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function setLogger(LoggerInterface $logger) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function get($operation, $parameters = array(), $data = 'records') |
||
96 | |||
97 | /** |
||
98 | * @param string $message |
||
99 | * @param array $context |
||
100 | */ |
||
101 | private function debug($message, $context = array()) |
||
107 | |||
108 | /** |
||
109 | * @param string $time |
||
110 | * |
||
111 | * @return array |
||
112 | */ |
||
113 | private function logTransferTime($time) |
||
119 | |||
120 | /** |
||
121 | * @param int $status |
||
122 | * @param string $response |
||
123 | * @param array $parameters |
||
124 | */ |
||
125 | private function logResponseError($status, $response, $parameters) |
||
136 | |||
137 | /** |
||
138 | * @param string $message |
||
139 | * @param array $context |
||
140 | */ |
||
141 | private function error($message, $context = array()) |
||
147 | } |
||
148 |