Exemple #1
0
 protected function loadDump()
 {
     if ($this->isDumpFileEmpty) {
         return;
     }
     try {
         $this->driver->load($this->dumpFile);
     } catch (\Exception $e) {
         throw new ModuleException(__CLASS__, $e->getMessage());
     }
 }
 protected function loadDump()
 {
     if ($this->isDumpFileEmpty) {
         return;
     }
     try {
         if ($this->config['dump_type'] === DUMP_TYPE_JS) {
             $this->driver->load($this->dumpFile);
         }
         if ($this->config['dump_type'] === DUMP_TYPE_MONGODUMP) {
             $this->driver->loadFromMongoDump($this->dumpFile);
         }
         if ($this->config['dump_type'] === DUMP_TYPE_MONGODUMP_TAR_GZ) {
             $this->driver->loadFromTarGzMongoDump($this->dumpFile);
         }
     } catch (\Exception $e) {
         throw new ModuleException(__CLASS__, $e->getMessage());
     }
 }