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
Currencies.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Money; |
| 4 | |
| 5 | use Money\Exception\UnknownCurrencyException; |
| 6 | |
| 7 | /** |
| 8 | * Implement this to provide a list of currencies. |
| 9 | * |
| 10 | * @author Mathias Verraes |
| 11 | */ |
| 12 | interface Currencies extends \IteratorAggregate |
| 13 | { |
| 14 | /** |
| 15 | * Checks whether a currency is available in the current context. |
| 16 | * |
| 17 | * @param Currency $currency |
| 18 | * |
| 19 | * @return bool |
| 20 | */ |
| 21 | public function contains(Currency $currency); |
| 22 | |
| 23 | /** |
| 24 | * Returns the subunit for a currency. |
| 25 | * |
| 26 | * @param Currency $currency |
| 27 | * |
| 28 | * @return int |
| 29 | * |
| 30 | * @throws UnknownCurrencyException If currency is not available in the current context |
| 31 | */ |
| 32 | public function subunitFor(Currency $currency); |
| 33 | } |
| 34 |