1 | <?php |
||
11 | class ExchangeRatesMapper implements MapperInterface |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @param ResponseInterface $response |
||
16 | * @return ExchangeRate[] |
||
17 | */ |
||
18 | public function map(ResponseInterface $response): array |
||
27 | |||
28 | /** |
||
29 | * @param string $body |
||
30 | * @return SimpleXMLElement |
||
31 | */ |
||
32 | private function parseBody(string $body): SimpleXMLElement |
||
45 | |||
46 | /** |
||
47 | * @param SimpleXMLElement $xml |
||
48 | * @return DateTime |
||
49 | */ |
||
50 | private function parseDate(SimpleXMLElement $xml): DateTime |
||
60 | |||
61 | /** |
||
62 | * @param SimpleXMLElement $xml |
||
63 | * @param DateTime $date |
||
64 | * @return array |
||
65 | */ |
||
66 | private function parseExchangeRates(SimpleXMLElement $xml, DateTime $date): array |
||
82 | |||
83 | } |