Example #1
0
 /**
  * Returns an instance of class (singleton pattern implementation).
  *
  * @return BOL_ConfigDao
  */
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Example #2
0
 private function exportConfigs(ZipArchive $za, $archiveDir)
 {
     $this->configs['avatarUrl'] = OW::getStorage()->getFileUrl(BOL_AvatarService::getInstance()->getAvatarsDir());
     $tableName = OW::getDbo()->escapeString(str_replace(OW_DB_PREFIX, '%%TBL-PREFIX%%', BOL_ConfigDao::getInstance()->getTableName()));
     $query = " SELECT `key`, `name`, `value`, `description` FROM " . BOL_ConfigDao::getInstance()->getTableName() . " WHERE name NOT IN ( 'maintenance', 'update_soft', 'site_installed', 'soft_build', 'soft_version' )\n                    AND `key` NOT IN ( 'dataimporter', 'dataexporter' ) ";
     $sql = DATAEXPORTER_BOL_ExportService::getInstance()->exportTableToSql(OW_DB_PREFIX . 'base_config', false, false, true, $query);
     $za->addFromString($archiveDir . '/configs.sql', $sql);
 }
Example #3
0
 /**
  * Removes all plugin configs.
  * 
  * @param string $pluginKey
  */
 public function removePluginConfigs($pluginKey)
 {
     $this->configDao->removeConfigs($pluginKey);
 }