Пример #1
0
 /**
  * 
  * Gather values to update into the DB.  Only values that have
  * Changed will be updated
  * 
  * @return array values that should be updated
  * 
  */
 protected function _getUpdateData()
 {
     // get only table columns that have changed
     $data = array();
     $cols = array_keys($this->_model->table_cols);
     foreach ($this->_data as $col => $val) {
         if (in_array($col, $cols) && $this->isChanged($col)) {
             $data[$col] = $val;
         }
     }
     // serialize columns for update
     $this->_model->serializeCols($data);
     // done!
     return $data;
 }