1 | <?php |
||
8 | class SoapCallRegistry |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $calls = []; |
||
14 | |||
15 | /** |
||
16 | * @param RequestEvent $event |
||
17 | */ |
||
18 | 6 | public function addRequest(RequestEvent $event) |
|
30 | |||
31 | /** |
||
32 | * @param ResponseEvent $event |
||
33 | */ |
||
34 | 6 | public function addResponse(ResponseEvent $event) |
|
47 | |||
48 | /** |
||
49 | * @param string $xml |
||
50 | * @return string |
||
51 | */ |
||
52 | 6 | private function prettyXML(string $xml): string |
|
53 | { |
||
54 | try { |
||
55 | //nicen |
||
56 | 6 | $doc = new \DomDocument('1.0'); |
|
57 | 6 | $doc->loadXML($xml); |
|
58 | 6 | $doc->formatOutput = true; |
|
59 | |||
60 | 6 | return $doc->saveXML(); |
|
61 | } catch (\Exception $e) { |
||
62 | // probably no xml, just let it pass |
||
63 | } |
||
64 | |||
65 | return $xml; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return array |
||
70 | */ |
||
71 | 3 | public function getCalls(): array |
|
75 | } |
||
76 |