public function store($updateNulls = true) { $store = parent::store($updateNulls); if ($store) { if (empty($this->id)) { $this->id = $this->getMax(); } } return $store; }
public function load($id, $jsonfields = array()) { if (method_exists($this, 'declareJSONfields')) { $jsonfields = array_merge($jsonfields, $this->declareJSONfields()); } parent::load($id); if (!empty($jsonfields)) { foreach ($jsonfields as $fieldname) { $this->{$fieldname} = $this->getParams($fieldname); } } return true; }