| 1 | <?php |
||
| 7 | class Currency |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $defaultCurrency; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var CurrencyBundleInterface |
||
| 16 | */ |
||
| 17 | private $currencyBundle; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * |
||
| 21 | * @param CurrencyBundleInterface $currencyBundle |
||
| 22 | * @param string $defaultCurrency ISO 4217 currency code |
||
| 23 | */ |
||
| 24 | 9 | public function __construct(CurrencyBundleInterface $currencyBundle, $defaultCurrency) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $currency ISO 4217 currency code |
||
| 32 | * |
||
| 33 | * @return string Name like "Euro" or "Schweizer Franken" |
||
| 34 | */ |
||
| 35 | 3 | public function getCurrencyName($currency = null) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $currency ISO 4217 currency code |
||
| 46 | * |
||
| 47 | * @return string Symbol like "€" or "CHF" |
||
| 48 | */ |
||
| 49 | 3 | public function getCurrencySymbol($currency = null) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return string ISO 4217 currency code |
||
| 60 | */ |
||
| 61 | 4 | public function getDefaultCurrency() |
|
| 65 | } |
||
| 66 |