Calculator
2 years ago
Currencies
2 years ago
Exception
2 years ago
Exchange
2 years ago
Formatter
2 years ago
PHPUnit
2 years ago
Parser
2 years ago
Calculator.php
6 years ago
Converter.php
2 years ago
Currencies.php
2 years ago
Currency.php
2 years ago
CurrencyPair.php
2 years ago
Exception.php
6 years ago
Exchange.php
2 years ago
Money.php
2 years ago
MoneyFactory.php
5 years ago
MoneyFormatter.php
2 years ago
MoneyParser.php
6 years ago
Number.php
2 years ago
Currencies.php
30 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 | * @return bool |
| 18 | */ |
| 19 | public function contains(Currency $currency); |
| 20 | |
| 21 | /** |
| 22 | * Returns the subunit for a currency. |
| 23 | * |
| 24 | * @return int |
| 25 | * |
| 26 | * @throws UnknownCurrencyException If currency is not available in the current context |
| 27 | */ |
| 28 | public function subunitFor(Currency $currency); |
| 29 | } |
| 30 |