1 | <?php |
||
11 | class PSR16CacheProvider implements ExchangeRateProviderInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var ExchangeRateProviderInterface |
||
15 | */ |
||
16 | private $exchangeRateProvider; |
||
17 | |||
18 | /** |
||
19 | * @var CacheInterface |
||
20 | */ |
||
21 | private $cache; |
||
22 | |||
23 | /** |
||
24 | * PSR16CacheProvider constructor. |
||
25 | * @param ExchangeRateProviderInterface $exchangeRateProvider |
||
26 | * @param CacheInterface|null $cache |
||
27 | */ |
||
28 | public function __construct( |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function getExchangeRate(CurrencyInterface $sourceCurrency, CurrencyInterface $targetCurrency, DateTimeInterface $date = null): ExchangeRateInterface |
||
49 | |||
50 | /** |
||
51 | * @param CurrencyInterface $sourceCurrency |
||
52 | * @param CurrencyInterface $targetCurrency |
||
53 | * @param DateTimeInterface|null $date |
||
54 | * @return string |
||
55 | */ |
||
56 | private function getKey(CurrencyInterface $sourceCurrency, CurrencyInterface $targetCurrency, DateTimeInterface $date = null): string |
||
63 | } |
||
64 |