| 1 | <?php |
||
| 13 | final class HistoricalSwapExchange implements HistoricalExchange |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var Swap |
||
| 17 | */ |
||
| 18 | private $swap; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param Swap $swap |
||
| 22 | */ |
||
| 23 | public function __construct(Swap $swap) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Returns a currency pair for the passed currencies with the rate coming from a third-party source. |
||
| 30 | * |
||
| 31 | * @param \DateTimeInterface $dateTime |
||
| 32 | * @param Currency $baseCurrency |
||
| 33 | * @param Currency $counterCurrency |
||
| 34 | * |
||
| 35 | * @return CurrencyPair |
||
| 36 | * |
||
| 37 | * @throws UnsupportedHistoricalDateException When the provided date is not supported |
||
| 38 | * @throws UnresolvableCurrencyPairException When there is no currency pair available for the currencies |
||
| 39 | */ |
||
| 40 | public function quoteHistorical(\DateTimeInterface $dateTime, Currency $baseCurrency, Currency $counterCurrency) |
||
| 50 | } |
||
| 51 |