1 | <?php |
||
10 | class LocalizedMoneyExtension extends \Twig_Extension |
||
|
|||
11 | { |
||
12 | public function getFunctions() |
||
19 | |||
20 | /** |
||
21 | * @param float $value Money amount. |
||
22 | * |
||
23 | * @param string $currency This can be any 3 letter ISO 4217 code. You |
||
24 | * can also set this to false to hide the currency symbol. |
||
25 | * |
||
26 | * @param integer $precision For some reason, if you need some precision |
||
27 | * other than 2 decimal places, you can modify this value. You probably |
||
28 | * won't need to do this unless, for example, you want to round to the |
||
29 | * nearest dollar (set the precision to 0). |
||
30 | * |
||
31 | * @param string $grouping This value is used internally as the |
||
32 | * NumberFormatter::GROUPING_USED value when using PHP's NumberFormatter |
||
33 | * class. Its documentation is non-existent, but it appears that if you set |
||
34 | * this to true, numbers will be grouped with a comma or period (depending |
||
35 | * on your locale): 12345.123 would display as 12,345.123. |
||
36 | * |
||
37 | * @param integer $divisor If, for some reason, you need to divide your |
||
38 | * starting value by a number before rendering it to the user, you can use |
||
39 | * the divisor option. |
||
40 | * |
||
41 | * @return string Localized money |
||
42 | */ |
||
43 | public function getLocalizedMoney($value, $currency = 'EUR', $precision = 2, $grouping = true, $divisor = 1) |
||
65 | |||
66 | /** |
||
67 | * @param string $currency This can be any 3 letter ISO 4217 code. You |
||
68 | * can also set this to false to return the general currency symbol. |
||
69 | * |
||
70 | * @return string Currency sign |
||
71 | */ |
||
72 | public function getCurrencySign($currency = false) |
||
91 | |||
92 | /** |
||
93 | * Returns the name of the extension. |
||
94 | * |
||
95 | * @return string The extension name |
||
96 | */ |
||
97 | public function getName() |
||
101 | } |
||
102 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.