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