/** * * @access private */ function prepareMapHash() { $file_cache = new KISS_Util_FileCache('0' . $this->mTableHash['name']); if ($file_cache->checkCacheStatus()) { $this->mTableFieldHash = unserialize($file_cache->getCacheContent()); } else { $this->mTableFieldHash = $this->SqlCommand->getTableFieldHash($this->mTableHash['name']); if (count($this->mTableFieldHash) > 0) { if (KISS_Framework_Config::getMode() == "online") { //如果系统运行在online模式下,则记录缓存,默认是online模式 $file_cache->putCacheContent(serialize($this->mTableFieldHash)); } } else { die('数据库访问错误!'); } } $keys = array_keys($this->mTableFieldHash); for ($i = 0; $i < count($this->mTableFieldHash); $i++) { $member_name = "m" . KISS_Util_Util::magicName($keys[$i]); $this->mMapHash[$keys[$i]] =& $this->{$member_name}; } $file_cache = new KISS_Util_FileCache('1' . $this->mTableHash['name']); if ($file_cache->checkCacheStatus()) { $this->mTableHash['key'] = unserialize($file_cache->getCacheContent()); } else { $this->mTableHash['key'] = $this->SqlCommand->getTablePrimeKey($this->mTableHash['name']); if (KISS_Framework_Config::getMode() == "online") { //如果系统运行在online模式下,则记录缓存,默认是online模式 $file_cache->putCacheContent(serialize($this->mTableHash['key'])); } } }
/** * 析构函数 * */ public function __destruct() { parent::__destruct(); if (KISS_Framework_Config::getMode() == 'debug') { KISS_Util_Debug::dumpinfo(); } }
/** * 析构函数 * */ public function __destruct() { if (self::$_new_class_found && !is_null($this->_auto_load_cache_file) && KISS_Framework_Config::getMode() == "online") { file_put_contents($this->_auto_load_cache_file, serialize(self::$_load_array)); } }
/** * 执行SQL查询 * * @param string $pQuery * @return mix */ function ExecuteQuery($pQuery) { $this->connectDB(); if (KISS_Framework_Config::getMode() == 'debug') { KISS_Util_Debug::setDebugInfo(array($this->UniqueObjectID, get_class($this), 'SQLQuery', $pQuery)); } return $this->db_query($pQuery); }