1 | <?php |
||
10 | class XmlClient extends AbstractClient |
||
11 | { |
||
12 | private $uri; |
||
13 | |||
14 | private $rawRequest; |
||
15 | |||
16 | private $options; |
||
17 | |||
18 | public function __construct($uri, array $options = []) |
||
23 | |||
24 | /** |
||
25 | * Post given xml string to remote gateway. |
||
26 | * |
||
27 | * @param string $xml |
||
28 | * @return array @see self::resolveResponse |
||
29 | */ |
||
30 | public function post($xml) |
||
37 | |||
38 | private function getMessageFactory() |
||
42 | |||
43 | /** |
||
44 | * Resolve the response from client. |
||
45 | * |
||
46 | * @param ResponseInterface $response |
||
47 | * @return array An array with following values: |
||
48 | * 'status' : The Http status of response |
||
49 | * 'headers' : An array of response headers |
||
50 | * 'body' : The response string. |
||
51 | * 'raw_response': The raw body response for logging purposes. |
||
52 | * 'raw_request' : The raw body request for logging purposes. |
||
53 | */ |
||
54 | protected function resolveResponse(ResponseInterface $response) |
||
66 | |||
67 | protected function authenticate(RequestInterface $request) |
||
71 | } |
||
72 |