1 | <?php |
||
30 | class Server implements InternalClientInterface |
||
31 | { |
||
32 | |||
33 | const PROTOCOL = 'http'; |
||
34 | const SQL_PATH = '/_sql'; |
||
35 | |||
36 | /** |
||
37 | * @var HttpClient |
||
38 | */ |
||
39 | private $client; |
||
40 | |||
41 | private $opts = [ |
||
42 | 'headers' => [] |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * @param string $uri |
||
47 | * @param array $options |
||
48 | */ |
||
49 | public function __construct($uri, array $options) |
||
56 | |||
57 | public function setTimeout($timeout) |
||
61 | 1 | ||
62 | public function setHttpBasicAuth($username, $passwd) |
||
66 | 1 | ||
67 | public function setHttpHeader($name, $value) |
||
71 | |||
72 | 1 | public function getServerInfo() |
|
77 | |||
78 | public function getServerVersion() |
||
83 | |||
84 | /** |
||
85 | * Execute a HTTP/1.1 POST request with JSON body |
||
86 | * |
||
87 | * @param array $body |
||
88 | |||
89 | * @return ResponseInterface |
||
90 | * @throws RequestException When an error is encountered |
||
91 | */ |
||
92 | public function doRequest(array $body) |
||
97 | |||
98 | 4 | /** |
|
99 | * Compute a URI for usage with the HTTP client |
||
100 | 4 | * |
|
101 | * @param string $server A host:port string |
||
102 | * |
||
103 | * @return string An URI which can be used by the HTTP client |
||
104 | */ |
||
105 | private static function computeURI($server) |
||
109 | } |
||
110 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.