public function loadUrl() { /* init cache object */ $cCache = new CCache($this->m_cConfig, $this->m_xmlFile); /* if it can use the cache, I use it or I cache it! */ if ($cCache->useCache == true) { $urlX = $cCache->getCache(); } /** * Cache config */ else { $xmlData = new CXmlController($this->m_xmlFile); $xmlData->setDefaultType("string-utf8"); $xmlData->startParser(); $urlX = $xmlData->getXmlData(); /* cache it for next one */ $cCache->setCache($urlX); } /* erstelle m_urlXml */ $this->assocUrl($urlX); }
public function loadConfig($xmlFile) { $xmlFile = $this->m_path + $xmlFile; /* init cache object for config file */ $cCache = new CCache($this->m_cConf, $xmlFile); /* if I can use the cache, I use it or I cache it! */ if ($cCache->useCache == true) { $this->m_config = $cCache->getCache(); } /** * Cache config */ else { parent::loadConfig($xmlFile); $cCache->setCache($this->m_config); } }
private function loadModelXml() { $xmlFile = MODEL_PATH . $this->m_modelFile; $cCache = new CCache($this->m_cConfig, $xmlFile); if (file_exists($xmlFile) == false) { throw new CError(ERROR_MODELSET_MODEL_FILE, array($this->m_modelName, $xmlFile)); } /*- * Can it use cache? */ if ($cCache->useCache() == true) { $xmlModels = $cCache->getCache(); /* push the modelName from the Model list */ $this->m_xmlSql = $xmlModels[$this->m_modelName]; } /*- * Read the xml file and cache it */ else { $xmlData = new CXmlModel($xmlFile); $xmlData->startParser(); $xmlModels = $xmlData->getXmlData(); if (array_key_exists($this->m_modelName, $xmlModels) == false) { throw new CError(ERROR_MODELSET_NOT_FOUND, array($this->m_modelName, $xmlFile)); } /* set xmlSql from model with modelName */ $this->m_xmlSql = $xmlModels[$this->m_modelName]; /* cache */ $cCache->setCache($xmlModels); } /* init default data */ $this->m_isTable = &$this->m_xmlSql["xmlModelTable"]; $this->m_realName = &$this->m_xmlSql["xmlModelName"]; }
private function loadPageXml($xmlFile) { /* init */ $file = CONTROLLER_PATH . $xmlFile; $this->m_fileName = $xmlFile; $cCache = new CCache($this->m_cConfig, $file); $retXml = array(); /** * Can it use cache? */ if ($cCache->useCache() == true) { $retXml = $cCache->getCache(); } /** * Read the xml file and cache it */ else { $xmlData = new CXmlController($file); $xmlData->setDefaultType("string-iso"); $xmlData->startParser(); $retXml = $xmlData->getXmlData(); /* cache */ $cCache->setCache($retXml); } return $retXml; }