1 | <?php |
||
5 | class ExchangeRateService extends BaseService |
||
6 | { |
||
7 | protected $baseUrl = 'https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt'; |
||
8 | |||
9 | protected $ident = 'exchange'; |
||
10 | |||
11 | /** |
||
12 | * Get all exchange rates |
||
13 | * |
||
14 | * @param null $date Returns today rates by default |
||
15 | * |
||
16 | * @return array |
||
17 | */ |
||
18 | 8 | public function getExchangeRates($date = null) |
|
41 | |||
42 | /** |
||
43 | * Return exchange rate for specific currency and date |
||
44 | * |
||
45 | * @param string $currency |
||
46 | * @param null $date Returns today rates by default |
||
47 | * |
||
48 | * @return float |
||
49 | */ |
||
50 | 4 | public function getExchangeRate($currency = 'EUR', $date = null) |
|
60 | } |