Calculator
4 years ago
Currencies
4 years ago
Exception
4 years ago
Exchange
4 years ago
Formatter
4 years ago
PHPUnit
4 years ago
Parser
4 years ago
Calculator.php
4 years ago
Converter.php
4 years ago
Currencies.php
4 years ago
Currency.php
4 years ago
CurrencyPair.php
4 years ago
Exception.php
4 years ago
Exchange.php
4 years ago
Money.php
4 years ago
MoneyFactory.php
4 years ago
MoneyFormatter.php
4 years ago
MoneyParser.php
4 years ago
Number.php
4 years ago
Exchange.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Money; |
| 4 | |
| 5 | use Money\Exception\UnresolvableCurrencyPairException; |
| 6 | |
| 7 | /** |
| 8 | * Provides a way to get exchange rate from a third-party source and return a currency pair. |
| 9 | * |
| 10 | * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> |
| 11 | */ |
| 12 | interface Exchange |
| 13 | { |
| 14 | /** |
| 15 | * Returns a currency pair for the passed currencies with the rate coming from a third-party source. |
| 16 | * |
| 17 | * @param Currency $baseCurrency |
| 18 | * @param Currency $counterCurrency |
| 19 | * |
| 20 | * @return CurrencyPair |
| 21 | * |
| 22 | * @throws UnresolvableCurrencyPairException When there is no currency pair (rate) available for the given currencies |
| 23 | */ |
| 24 | public function quote(Currency $baseCurrency, Currency $counterCurrency); |
| 25 | } |
| 26 |