_format = $format; $this->_decimals = $decimals; $this->_decPoint = $decPoint; $this->_thousandsSep = $thousandsSep; } public function filter($value) { if (!is_null($this->_decimals)) { $value = number_format($value, $this->_decimals, $this->_decPoint, $this->_thousandsSep); } $value = sprintf($this->_format, $value); return $value; } }