Пример #1
0
 function save(eModule &$eModule)
 {
     try {
         if ($eModule->isEmpty()) {
             $eModule->id = $this->genId();
             $this->insert($eModule->toData());
             Helper_App_Log::write($this->lastQuery(), FALSE, Helper_App_Log::LOG_INSERT);
         } else {
             $this->update($eModule->toData(FALSE), $eModule->id);
             Helper_App_Log::write($this->lastQuery(), FALSE, Helper_App_Log::LOG_UPDATE);
         }
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
 }