1 | <?php |
||
15 | class MoneyConverter |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var ISOCurrencies |
||
20 | */ |
||
21 | private $isoCurrencies; |
||
22 | |||
23 | /** |
||
24 | * CreateChargeRequest constructor. |
||
25 | */ |
||
26 | 11 | public function __construct() |
|
30 | |||
31 | /** |
||
32 | * Create a money object from a (float) amount and a currency. |
||
33 | * |
||
34 | * @param float $amount |
||
35 | * @param string $currencyCode |
||
36 | * @return Money |
||
37 | */ |
||
38 | 1 | public function fromAmountAndCurrency($amount, $currencyCode) |
|
45 | |||
46 | /** |
||
47 | * @param Money $money |
||
48 | * @return float |
||
49 | */ |
||
50 | 10 | public function toFloat(Money $money) |
|
55 | |||
56 | /** |
||
57 | * Calculate the decimal factor for a currency |
||
58 | * |
||
59 | * @param Currency $currency |
||
60 | * @return integer |
||
61 | */ |
||
62 | 11 | private function getDecimalFactor(Currency $currency) |
|
67 | } |
||
68 |