2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2008-02-25 03:10:37 +01:00
|
|
|
/**
|
|
|
|
* Represents a floating point field.
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage model
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
|
|
|
class Float extends DBField {
|
|
|
|
|
|
|
|
function requireField() {
|
2008-04-05 00:58:58 +02:00
|
|
|
DB::requireField($this->tableName, $this->name, "float");
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function Nice() {
|
|
|
|
return number_format($this->value, 2);
|
2008-08-06 04:43:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function scaffoldFormField($title = null) {
|
|
|
|
return new NumericField($this->name, $title);
|
|
|
|
}
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
2008-04-05 00:58:58 +02:00
|
|
|
?>
|