1 | <?php |
||
13 | class CurlClient implements HttpClientInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var Curl |
||
17 | */ |
||
18 | private $instance; |
||
19 | |||
20 | /** |
||
21 | * CurlClient constructor. |
||
22 | * @throws ErrorException |
||
23 | */ |
||
24 | public function __construct() |
||
28 | |||
29 | /** |
||
30 | * @param string $method |
||
31 | * @param string $url |
||
32 | * @param array $data |
||
33 | * @return array|string|null |
||
34 | * @throws HttpClientException |
||
35 | */ |
||
36 | public function call(string $method, string $url, array $data) |
||
51 | |||
52 | /** |
||
53 | * @param string $login |
||
54 | * @param string $password |
||
55 | */ |
||
56 | public function setBasicAuthentication(string $login, string $password): void |
||
60 | |||
61 | /** |
||
62 | * @param int $timeout |
||
63 | */ |
||
64 | public function setTimeout(int $timeout): void |
||
68 | } |
||
69 |