| 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 |
|