1 | <?php |
||
10 | class XmlClient extends AbstractClient |
||
11 | { |
||
12 | private $uri; |
||
13 | |||
14 | private $headers = []; |
||
15 | |||
16 | public function __construct($uri, array $options = []) |
||
21 | |||
22 | public function addHeader($name, $value) |
||
26 | |||
27 | /** |
||
28 | * Post given xml string to remote gateway. |
||
29 | * |
||
30 | * @param string $xml |
||
31 | * @return array @see self::resolveResponse |
||
32 | */ |
||
33 | public function post($xml) |
||
40 | |||
41 | private function getMessageFactory() |
||
45 | |||
46 | /** |
||
47 | * Resolve the response from client. |
||
48 | * |
||
49 | * @param ResponseInterface $response |
||
50 | * @return array An array with following values: |
||
51 | * 'status' : The Http status of response |
||
52 | * 'headers' : An array of response headers |
||
53 | * 'body' : The response string. |
||
54 | * 'raw_response': The raw body response for logging purposes. |
||
55 | * 'raw_request' : The raw body request for logging purposes. |
||
56 | */ |
||
57 | protected function resolveResponse(ResponseInterface $response) |
||
69 | |||
70 | protected function authenticate(RequestInterface $request) |
||
74 | } |
||
75 |