Public Member Functions | |
| __construct ($format, $decimals=null, $decPoint='.', $thousandsSep=',') | |
| filter ($value) | |
Protected Attributes | |
| $_format = null | |
| $_decimals = null | |
| $_decPoint = null | |
| $_thousandsSep = null | |
Definition at line 28 of file Sprintf.php.
| __construct | ( | $ | format, | |
| $ | decimals = null, |
|||
| $ | decPoint = '.', |
|||
| $ | thousandsSep = ',' | |||
| ) |
Definition at line 35 of file Sprintf.php.
00036 { 00037 $this->_format = $format; 00038 $this->_decimals = $decimals; 00039 $this->_decPoint = $decPoint; 00040 $this->_thousandsSep = $thousandsSep; 00041 }
| filter | ( | $ | value | ) |
Definition at line 43 of file Sprintf.php.
00044 { 00045 if (!is_null($this->_decimals)) { 00046 $value = number_format($value, $this->_decimals, $this->_decPoint, $this->_thousandsSep); 00047 } 00048 $value = sprintf($this->_format, $value); 00049 return $value; 00050 }
$_decimals = null [protected] |
Definition at line 31 of file Sprintf.php.
$_decPoint = null [protected] |
Definition at line 32 of file Sprintf.php.
$_format = null [protected] |
Definition at line 30 of file Sprintf.php.
$_thousandsSep = null [protected] |
Definition at line 33 of file Sprintf.php.
1.5.8