1 | <?php |
||
10 | class Money |
||
11 | { |
||
12 | private $amount; |
||
13 | private $currency; |
||
14 | |||
15 | /** |
||
16 | * @param float|integer $amount |
||
17 | * @param Currency $currency iso4217 currency |
||
18 | */ |
||
19 | 10 | public function __construct( |
|
26 | |||
27 | 1 | public function __toString(): string |
|
35 | |||
36 | /** |
||
37 | * @param float|integer|string $amount |
||
38 | */ |
||
39 | 10 | public function setAmount( |
|
46 | |||
47 | 2 | public function getAmount(): float |
|
51 | |||
52 | /** |
||
53 | * @param string|null $locale if null, defaults to Locale::getDefault |
||
54 | */ |
||
55 | 2 | public function getFormattedAmount( |
|
69 | |||
70 | 2 | public function getCurrency(): Currency |
|
74 | } |
||
75 |