Esempio n. 1
0
 public function save(Default_Model_TempFiles $model)
 {
     $data = array('userId' => $model->getUserId(), 'fileName' => $model->getFileName(), 'type' => $model->getType(), 'fileType' => $model->getFileType(), 'fileSize' => $model->getFileSize());
     if (null === ($id = $model->getId())) {
         $data['created'] = new Zend_Db_Expr('NOW()');
         $id = $this->getDbTable()->insert($data);
     } else {
         $this->getDbTable()->update($data, array('id = ?' => $id));
     }
     return $id;
 }