1 | <?php |
||
9 | class CnbFacade |
||
10 | { |
||
11 | private $exchangeRateService; |
||
12 | |||
13 | private $priborService; |
||
14 | |||
15 | 9 | public function __construct(ExchangeRateService $exchanges, PriborService $pribors) |
|
20 | |||
21 | |||
22 | //--- Exchange Services |
||
23 | |||
24 | |||
25 | 3 | public function getExchangeRates($date = null) |
|
29 | |||
30 | 1 | public function updateTodayExchangeRates() |
|
38 | |||
39 | 2 | public function getExchangeRate($currency = 'CZK', $date = null) |
|
43 | |||
44 | |||
45 | //--- PRIBOR Services |
||
46 | |||
47 | |||
48 | 3 | public function getPriborRates($date = null) |
|
52 | |||
53 | 1 | public function updateTodayPriborRates() |
|
61 | |||
62 | 1 | public function getPriborRate($date = null, $interval = 'year') |
|
66 | |||
67 | |||
68 | //--- PRIBOR shortcuts |
||
69 | |||
70 | |||
71 | public function getPriborRateForYear($date = null) |
||
75 | |||
76 | 1 | public function getPriborRateFor9Months($date = null) |
|
80 | |||
81 | public function getPriborRateFor6Months($date = null) |
||
85 | |||
86 | public function getPriborRateFor3Months($date = null) |
||
90 | |||
91 | public function getPriborRateFor2Months($date = null) |
||
95 | |||
96 | public function getPriborRateForMonth($date = null) |
||
100 | |||
101 | public function getPriborRateFor2Weeks($date = null) |
||
105 | |||
106 | public function getPriborRateForWeek($date = null) |
||
110 | |||
111 | public function getPriborRateForDay($date = null) |
||
115 | } |