1 | <?php |
||
24 | class CurrencySubunits |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * array keys are currency codes, values are a sub-array with the following values: |
||
29 | * "decimals" : the decimal fraction, or order of magnitude difference, |
||
30 | * between that currency's main units and subunits. |
||
31 | * E.g. for USD the decimal fraction is 2. |
||
32 | * |
||
33 | * @var array $currency_subunits |
||
34 | */ |
||
35 | private $currency_subunits; |
||
36 | |||
37 | |||
38 | |||
39 | /** |
||
40 | * Returns all the currency subunit data |
||
41 | * |
||
42 | * @return array |
||
43 | * @throws EE_Error |
||
44 | */ |
||
45 | public function getAll() |
||
50 | |||
51 | |||
52 | |||
53 | /** |
||
54 | * Gets the decimal fraction, or order of magnitude difference between the currency's main units and subunits. |
||
55 | * |
||
56 | * @param $currency_code |
||
57 | * @return mixed |
||
58 | * @throws EE_Error |
||
59 | * @throws InvalidIdentifierException |
||
60 | */ |
||
61 | public function decimalsForCode($currency_code) |
||
76 | |||
77 | |||
78 | /** |
||
79 | * Just verifies this object's data from the filesystem has been loaded |
||
80 | * |
||
81 | * @throws EE_Error |
||
82 | */ |
||
83 | private function ensureInitialized() |
||
92 | |||
93 | |||
94 | } |
||
95 |