1 | <?php |
||
15 | class HttpGuzzlClient implements HttpClientInterface |
||
16 | { |
||
17 | const DEFAULT_CONNECTION_TIMEOUT = 5; |
||
18 | const DEFAULT_TIMEOUT = 30; |
||
19 | |||
20 | /** |
||
21 | * @var ClientInterface |
||
22 | */ |
||
23 | private $oGuzzelClient; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $aGuzzelClientConfig; |
||
29 | |||
30 | /** |
||
31 | * @param ClientInterface $oGuzzelClient |
||
32 | * @param array $aGuzzelClientConfig |
||
33 | */ |
||
34 | 7 | public function __construct( |
|
42 | |||
43 | /** |
||
44 | * @param string $sUrl |
||
45 | * @return HttpClientResponseInterface |
||
46 | * @throws HttpConnectionException |
||
47 | */ |
||
48 | 3 | public function get($sUrl) |
|
70 | |||
71 | /** |
||
72 | * @param string $sUrl |
||
73 | * @param mixed $mPostData |
||
74 | * @return HttpGuzzlResponse |
||
75 | */ |
||
76 | 2 | public function postJsonData($sUrl, $mPostData) |
|
86 | |||
87 | /** |
||
88 | * @param string $sUrl |
||
89 | * @return HttpGuzzlResponse |
||
90 | */ |
||
91 | 2 | public function delete($sUrl) |
|
99 | |||
100 | /** |
||
101 | * Adds authentication headers according the Guzzle http options. |
||
102 | * |
||
103 | * @param array $aOptions |
||
104 | * @return array |
||
105 | */ |
||
106 | 7 | private function addAuthOption(array $aOptions) { |
|
121 | } |