1 | <?php |
||
18 | class NumberFormat extends FilterRule |
||
19 | { |
||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $decimals; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $decimalPoint; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $thousandSeparator; |
||
34 | |||
35 | /** |
||
36 | * Set required params for replacement |
||
37 | * |
||
38 | * @param int $decimals |
||
39 | * @param string $decimalPoint |
||
40 | * @param string $thousandSeparator |
||
41 | */ |
||
42 | 12 | public function __construct($decimals, $decimalPoint, $thousandSeparator) |
|
48 | |||
49 | /** |
||
50 | * Format the numbers |
||
51 | * |
||
52 | * @param mixed $value |
||
53 | * @return string |
||
54 | */ |
||
55 | 12 | public function filter($value) |
|
63 | } |
||
64 |