public function set($value) { if (!is_numeric($value)) { throw new ModelException("Field {$this->_model}.{$this->name}: Not a numeric value : {$value}"); } return parent::set($value); }
public function __construct($dict = array()) { $this->maxlength = Functions::nz($dict['maxlength'], 255); if (!isset($dict['default'])) { $dict['default'] = ''; } parent::__construct($dict); }
public function set($value) { if ($value === '') { $value = 0; } if (!is_numeric($value)) { throw new ModelException("Field {$this->_model}.{$this->name}: Not a numeric value : {$value}"); } if ($value < 0) { throw new ModelException("Field {$this->name}: no negative values allowed : {$value}"); } return parent::set($value); }
public function __construct($dict = array()) { $this->size = Functions::nz($dict['size'], 5); parent::__construct($dict); }
public function __construct($dict = array()) { $this->options = Functions::nz($dict['options'], array()); parent::__construct($dict); }