1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
11 | abstract class Kohana_Jam_Field_Integer extends Jam_Field { |
||
12 | |||
13 | /** |
||
14 | * @var int default value is 0, per the SQL standard |
||
15 | */ |
||
16 | public $default = 0; |
||
17 | |||
18 | /** |
||
19 | * Converts the value to an integer. |
||
20 | * |
||
21 | * @param mixed $value |
||
22 | * @return int |
||
23 | */ |
||
24 | 63 | public function set(Jam_Validated $model, $value, $is_changed) |
|
35 | |||
36 | /** |
||
37 | * Like Jam_Field::_default, but it won't convert 0 and 0.0 to empty_value |
||
38 | * |
||
39 | * @param Jam_Validated $model |
||
40 | * @param mixed $value |
||
41 | * @return array 1st element the converted value; 2nd element a boolean |
||
42 | * indicating if the value should not be processed further |
||
43 | */ |
||
44 | 63 | protected function _default(Jam_Validated $model, $value) |
|
66 | |||
67 | } // End Kohana_Jam_Field_Integer |
||
68 |