Esempio n. 1
0
 public function store($updateNulls = true)
 {
     $store = parent::store($updateNulls);
     if ($store) {
         if (empty($this->id)) {
             $this->id = $this->getMax();
         }
     }
     return $store;
 }
Esempio n. 2
0
 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;
 }