1 | <?php |
||
11 | class DoctrineORMProvider implements ExchangeRateProviderInterface |
||
12 | { |
||
13 | private const DEFAULT_PROPERTY_MAP = [ |
||
14 | 'sourceCurrency' => 'sourceCurrencyCode', |
||
15 | 'targetCurrency' => 'targetCurrencyCode', |
||
16 | 'date' => 'date', |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * @var ManagerRegistry |
||
21 | */ |
||
22 | private $managerRegistry; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $entityClass; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $propertyMap; |
||
33 | |||
34 | /** |
||
35 | * DoctrineORMProvider constructor. |
||
36 | * @param ManagerRegistry $managerRegistry |
||
37 | * @param string $entityClass |
||
38 | * @param array $propertyMap |
||
39 | * @throws \InvalidArgumentException |
||
40 | */ |
||
41 | public function __construct( |
||
53 | |||
54 | /** |
||
55 | * @inheritDoc |
||
56 | */ |
||
57 | public function getExchangeRate(CurrencyInterface $sourceCurrency, CurrencyInterface $targetCurrency, DateTimeInterface $date = null): ExchangeRateInterface |
||
90 | } |
||
91 |