1 | <?php |
||
11 | class EcbClient implements EcbClientInterface |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @const string |
||
16 | */ |
||
17 | const HTTP_GET = 'GET'; |
||
18 | |||
19 | /** |
||
20 | * @const string |
||
21 | */ |
||
22 | const DEFAULT_EXCHANGE_RATES_URL = 'https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'; |
||
23 | |||
24 | /** |
||
25 | * @var Client |
||
26 | */ |
||
27 | private $client; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $exchangeRatesUrl; |
||
33 | |||
34 | /** |
||
35 | * @param string $exchangeRatesUrl |
||
36 | */ |
||
37 | public function __construct(string $exchangeRatesUrl = null) |
||
46 | |||
47 | /** |
||
48 | * @throws ExchangeRatesRequestFailedException |
||
49 | * @return ExchangeRate[] |
||
50 | */ |
||
51 | public function getExchangeRates(): array |
||
62 | |||
63 | } |
||
64 |