/** * Constructor * * @access public * @since 1.0 */ public function __construct() { $this->_generic = SLS_Generic::getInstance(); $this->_cache = $this->_generic->getObjectCache(); $this->_xmlToolBox = new SLS_XMLToolbox(); $this->_xmlToolBox->startTag("Components"); $this->_xmlToolBox->addFullTag("Sls", "", false); if ($this->_generic->getSide() == "user" || ($this->_generic->getActionId() == $this->_generic->getActionId("SLS_Bo","ProdSettings"))) $this->_xmlToolBox->addFullTag("Site", "", false); $this->_xmlToolBox->endTag("Components"); $this->_isCache = $this->_generic->isCache(); $this->_cacheXML = new SLS_XMLToolbox(false); if (!$this->_isCache) $this->_cacheXML->startTag("components"); // Load Core Statics $this->recursiveStaticLoading($this->_generic->getPathConfig("coreComponentsControllers"), 'Sls'); if ($this->_generic->getSide() == "user" || ($this->_generic->getActionId() == $this->_generic->getActionId("SLS_Bo","ProdSettings"))) $this->recursiveStaticLoading($this->_generic->getPathConfig("componentsControllers"), 'Site'); if (!$this->_isCache) { $this->_cacheXML->endTag("components"); $writeXML = new SLS_XMLToolbox(file_get_contents($this->_generic->getPathConfig("configSecure")."cache.xml")); $writeXML->overwriteTags("//statics", $this->_cacheXML->getXML('noHeader')); $writeXML->saveXML($this->_generic->getPathConfig("configSecure")."cache.xml"); } return $this->getXML(); }
/** * Construct the XML * * @access public * @since 1.0 */ public function constructXML() { $this->_cacheXML = new SLS_XMLToolbox(); $this->_cacheActive = $this->_generic->isCache(); $this->_xmlToolBox->startTag("JsStatics"); $dirStatics = $this->_generic->getPathConfig("jsStatics"); $dirGlobals = $this->_generic->getPathConfig("js"); $dirCoreStatics = $this->_generic->getPathConfig("coreJsStatics"); $jsHandle = file_get_contents($this->_generic->getPathConfig("configSecure")."cache.xml"); if (!$this->_cacheActive) { $this->_cacheXML->startTag("javascripts"); $this->_arrayStatics['js']['path'] = array(); $this->_arrayStatics['js']['filename'] = array(); $domainName = $this->_generic->getSiteConfig("domainName",($this->_generic->hasCdn()) ? $this->_generic->getCdn() : ""); $protocol = $this->_generic->getProtocol(); $this->recursiveRead($dirStatics, $this->_arrayStatics['js']['path'], $this->_arrayStatics['js']['filename']); array_multisort($this->_arrayStatics['js']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['js']['path'], SORT_ASC, SORT_STRING); $this->_xmlToolBox->startTag("filesStatics"); $this->_cacheXML->startTag("filesStatics"); for($i=0;$i<count($this->_arrayStatics['js']['filename']);$i++) { $this->_xmlToolBox->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); $this->_cacheXML->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); } $this->_cacheXML->endTag("filesStatics"); $this->_xmlToolBox->endTag("filesStatics"); $this->_arrayStatics['js']['path'] = array(); $this->_arrayStatics['js']['filename'] = array(); $this->recursiveRead($dirCoreStatics, $this->_arrayStatics['js']['path'], $this->_arrayStatics['js']['filename']); array_multisort($this->_arrayStatics['js']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['js']['path'], SORT_ASC, SORT_STRING); $this->_xmlToolBox->startTag("filesCoreStatics"); $this->_cacheXML->startTag("filesCoreStatics"); for($i=0;$i<count($this->_arrayStatics['js']['filename']);$i++) { $this->_xmlToolBox->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); $this->_cacheXML->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); } $this->_cacheXML->endTag("filesCoreStatics"); $this->_xmlToolBox->endTag("filesCoreStatics"); $this->_arrayStatics['js']['path'] = array(); $this->_arrayStatics['js']['filename'] = array(); if (substr($dirStatics, strlen($dirStatics)-1, 1) != "/") $dirStatics .= "/"; $paths[0] = $dirStatics; $this->recursiveRead($dirGlobals, $this->_arrayStatics['js']['path'], $this->_arrayStatics['js']['filename'], $paths); array_multisort($this->_arrayStatics['js']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['js']['path'], SORT_ASC, SORT_STRING); $this->_xmlToolBox->startTag("filesDyn"); $this->_cacheXML->startTag("filesDyn"); for($i=0;$i<count($this->_arrayStatics['js']['filename']);$i++) { $this->_xmlToolBox->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); $this->_cacheXML->addFullTag("file", $protocol."://".$domainName."/".$this->_arrayStatics['js']['path'][$i], true); } $this->_cacheXML->endTag("filesDyn"); $this->_xmlToolBox->endTag("filesDyn"); $this->_cacheXML->endTag("javascripts"); $writeXML = new SLS_XMLToolbox($jsHandle); $writeXML->overwriteTags("//statics", $this->_cacheXML->getXML('noHeader')); $writeXML->saveXML($this->_generic->getPathConfig("configSecure")."cache.xml"); } else { $xmlCache = new SLS_XMLToolbox($jsHandle); $files = $xmlCache->getTags("//statics/javascripts/filesCoreStatics/file"); $this->_xmlToolBox->startTag("filesCoreStatics"); foreach ($files as $file) $this->_xmlToolBox->addFullTag("file", $file, true); $this->_xmlToolBox->endTag("filesCoreStatics"); $files = $xmlCache->getTags("//statics/javascripts/filesStatics/file"); $this->_xmlToolBox->startTag("filesStatics"); foreach ($files as $file) $this->_xmlToolBox->addFullTag("file", $file, true); $this->_xmlToolBox->endTag("filesStatics"); $files = $xmlCache->getTags("//statics/javascripts/filesDyn/file"); $this->_xmlToolBox->startTag("filesDyn"); foreach ($files as $file) $this->_xmlToolBox->addFullTag("file", $file, true); $this->_xmlToolBox->endTag("filesDyn"); } $this->_xmlToolBox->endTag("JsStatics"); }
/** * Construct the XML * * @access public * @since 1.0 */ public function constructXML() { $this->_cacheXML = new SLS_XMLToolbox(false); $this->_cacheActive = $this->_generic->isCache(); $this->_xmlToolBox->startTag("XslStatics"); // Recover path of Statics Unloaded #$dirStaticsUnloaded = $this->_generic->getPathConfig("viewsGenericsUnloaded"); $dirStaticsUnloaded = $this->_generic->getPathConfig("viewsGenerics"); // Recover path of Statics Loaded Body #$dirStaticsLoadedBody = $this->_generic->getPathConfig("viewsGenericsLoadedBody"); // Recover path of Statics Loaded Headers #$dirStaticsLoadedHeaders = $this->_generic->getPathConfig("viewsGenericsLoadedHeaders"); // Recover path of SLS Statics Unloaded $dirSlsStaticsUnloaded = $this->_generic->getPathConfig("slsViewsGenericsUnloaded"); // Recover path of SLS Statics Loaded Body $dirSlsStaticsLoadedBody = $this->_generic->getPathConfig("slsViewsGenericsLoadedBody"); // Recover path of SLS Statics Loaded Headers $dirSlsStaticsLoadedHeaders = $this->_generic->getPathConfig("slsViewsGenericsLoadedHeaders"); // Recover path of Core Statics Unloaded $dirCoreStaticsUnloaded = $this->_generic->getPathConfig("coreViewsGenericsUnloaded"); // Recover path of Core Statics Loaded Body $dirCoreStaticsLoadedBody = $this->_generic->getPathConfig("coreViewsGenericsLoadedBody"); // Recover path of Core Statics Loaded Headers $dirCoreStaticsLoadedHeaders = $this->_generic->getPathConfig("coreViewsGenericsLoadedHeaders"); $xslHandle = file_get_contents($this->_generic->getPathConfig("configSecure")."cache.xml"); // If cache not active if (!$this->_cacheActive) { $this->_xmlToolBox->startTag("files"); $this->_cacheXML->startTag("xsls"); $this->_cacheXML->startTag("files"); // Put in cache.xml User Unloaded Files but in current XML only if side == 'user' ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("Unloaded") : ""; $this->_cacheXML->startTag("Unloaded"); $this->_arrayStatics['unloaded']['templateName'] = array(); $this->_arrayStatics['unloaded']['path'] = array(); $this->_arrayStatics['unloaded']['filename'] = array(); $this->recursiveRead($dirStaticsUnloaded, false, $this->_arrayStatics['unloaded']['templateName'], $this->_arrayStatics['unloaded']['path'], $this->_arrayStatics['unloaded']['filename']); array_multisort($this->_arrayStatics['unloaded']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['unloaded']['path'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['unloaded']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['unloaded']); $this->_cacheXML->endTag("Unloaded"); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->endTag("Unloaded") : ""; // Put in cache.xml the SLS Unloaded Files but in current XML only if side == 'sls' ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("Unloaded") : ""; $this->_cacheXML->startTag("SlsUnloaded"); $this->_arrayStatics['unloaded']['templateName'] = array(); $this->_arrayStatics['unloaded']['path'] = array(); $this->_arrayStatics['unloaded']['filename'] = array(); $this->recursiveRead($dirSlsStaticsUnloaded, false, $this->_arrayStatics['unloaded']['templateName'], $this->_arrayStatics['unloaded']['path'], $this->_arrayStatics['unloaded']['filename']); array_multisort($this->_arrayStatics['unloaded']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['unloaded']['path'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['unloaded']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['unloaded']); $this->_cacheXML->endTag("SlsUnloaded"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("Unloaded") : ""; // Put in cache.xml the Core Unloaded Files &&t in current XML $this->_xmlToolBox->startTag("CoreUnloaded"); $this->_cacheXML->startTag("CoreUnloaded"); $this->_arrayStatics['unloaded']['templateName'] = array(); $this->_arrayStatics['unloaded']['path'] = array(); $this->_arrayStatics['unloaded']['filename'] = array(); $this->recursiveRead($dirCoreStaticsUnloaded, false, $this->_arrayStatics['unloaded']['templateName'], $this->_arrayStatics['unloaded']['path'], $this->_arrayStatics['unloaded']['filename']); array_multisort($this->_arrayStatics['unloaded']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['unloaded']['path'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['unloaded']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); $this->_xmlToolBox->startTag("xsl"); $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true); $this->_cacheXML->addFullTag("file", $this->_arrayStatics['unloaded']['path'][$i], true); $this->_xmlToolBox->endTag("xsl"); $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['unloaded']); $this->_cacheXML->endTag("CoreUnloaded"); $this->_xmlToolBox->endTag("CoreUnloaded"); // Put in cache.xml the User loaded Body Files but in current XML only if side == user ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("Loaded") : ""; $this->_cacheXML->startTag("Loaded"); /*($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("Body") : ""; $this->_cacheXML->startTag("Body"); $this->_arrayStatics['loadedBody']['templateName'] = array(); $this->_arrayStatics['loadedBody']['path'] = array(); $this->_arrayStatics['loadedBody']['filename'] = array(); $this->recursiveRead($dirStaticsLoadedBody, true, $this->_arrayStatics['loadedBody']['templateName'], $this->_arrayStatics['loadedBody']['path'], $this->_arrayStatics['loadedBody']['filename']); array_multisort($this->_arrayStatics['loadedBody']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedBody']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true) : ""; $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedBody']); $this->_cacheXML->endTag("Body"); ($this->_generic->getSide() == "user") ?$this->_xmlToolBox->endTag("Body") : "";*/ // Put in cache.xml the Sls loaded Body Files but in current XML only if side == sls ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("Loaded") : ""; /*($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("Body") : ""; $this->_cacheXML->startTag("SlsBody"); $this->_arrayStatics['loadedBody']['templateName'] = array(); $this->_arrayStatics['loadedBody']['path'] = array(); $this->_arrayStatics['loadedBody']['filename'] = array(); $this->recursiveRead($dirStaticsLoadedBody, true, $this->_arrayStatics['loadedBody']['templateName'], $this->_arrayStatics['loadedBody']['path'], $this->_arrayStatics['loadedBody']['filename']); array_multisort($this->_arrayStatics['loadedBody']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedBody']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true) : ""; $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedBody']); $this->_cacheXML->endTag("SlsBody"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("Body") : "";*/ // Put in cache.xml the Core loaded Body Files && in current XML $this->_xmlToolBox->startTag("CoreBody"); $this->_cacheXML->startTag("CoreBody"); $this->_arrayStatics['loadedBody']['templateName'] = array(); $this->_arrayStatics['loadedBody']['path'] = array(); $this->_arrayStatics['loadedBody']['filename'] = array(); $this->recursiveRead($dirCoreStaticsLoadedBody, true, $this->_arrayStatics['loadedBody']['templateName'], $this->_arrayStatics['loadedBody']['path'], $this->_arrayStatics['loadedBody']['filename']); array_multisort($this->_arrayStatics['loadedBody']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedBody']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedBody']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); $this->_xmlToolBox->startTag("xsl"); $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true); $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedBody']['path'][$i], true); $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true); $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedBody']['templateName'][$i], true); $this->_xmlToolBox->endTag("xsl"); $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedBody']); $this->_cacheXML->endTag("CoreBody"); $this->_xmlToolBox->endTag("CoreBody"); // Put in cache.xml the User loaded Headers Files but in current XML only if side == user /*($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("Headers") : ""; $this->_cacheXML->startTag("Headers"); $this->_arrayStatics['loadedHeaders']['templateName'] = array(); $this->_arrayStatics['loadedHeaders']['path'] = array(); $this->_arrayStatics['loadedHeaders']['filename'] = array(); $this->recursiveRead($dirStaticsLoadedHeaders, true, $this->_arrayStatics['loadedHeaders']['templateName'], $this->_arrayStatics['loadedHeaders']['path'], $this->_arrayStatics['loadedHeaders']['filename']); array_multisort($this->_arrayStatics['loadedHeaders']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedHeaders']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true) : ""; $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedHeaders']); $this->_cacheXML->endTag("Headers"); ($this->_generic->getSide() == "user") ? $this->_xmlToolBox->endTag("Headers") : ""; // Put in cache.xml the Sls loaded Headers Files but in current XML only if side == sls /*($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("Headers") : ""; $this->_cacheXML->startTag("SlsHeaders"); $this->_arrayStatics['loadedHeaders']['templateName'] = array(); $this->_arrayStatics['loadedHeaders']['path'] = array(); $this->_arrayStatics['loadedHeaders']['filename'] = array(); $this->recursiveRead($dirStaticsLoadedHeaders, true, $this->_arrayStatics['loadedHeaders']['templateName'], $this->_arrayStatics['loadedHeaders']['path'], $this->_arrayStatics['loadedHeaders']['filename']); array_multisort($this->_arrayStatics['loadedHeaders']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedHeaders']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->startTag("xsl") : ""; ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true) : ""; $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true) : ""; $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("xsl") : ""; $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedHeaders']); $this->_cacheXML->endTag("SlsHeaders"); ($this->_generic->getSide() == "sls") ? $this->_xmlToolBox->endTag("Headers") : "";*/ // Put in cache.xml the Core loaded Headers Files && in current XML $this->_xmlToolBox->startTag("CoreHeaders"); $this->_cacheXML->startTag("CoreHeaders"); $this->_arrayStatics['loadedHeaders']['templateName'] = array(); $this->_arrayStatics['loadedHeaders']['path'] = array(); $this->_arrayStatics['loadedHeaders']['filename'] = array(); $this->recursiveRead($dirCoreStaticsLoadedHeaders, true, $this->_arrayStatics['loadedHeaders']['templateName'], $this->_arrayStatics['loadedHeaders']['path'], $this->_arrayStatics['loadedHeaders']['filename']); array_multisort($this->_arrayStatics['loadedHeaders']['filename'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['path'], SORT_ASC, SORT_STRING, $this->_arrayStatics['loadedHeaders']['templateName'], SORT_ASC, SORT_STRING); for($i=0;$i<count($this->_arrayStatics['loadedHeaders']['filename']);$i++) { $this->_cacheXML->startTag("xsl"); $this->_xmlToolBox->startTag("xsl"); $this->_xmlToolBox->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true); $this->_cacheXML->addFullTag("file", $this->_arrayStatics['loadedHeaders']['path'][$i], true); $this->_xmlToolBox->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true); $this->_cacheXML->addFullTag("templateName", $this->_arrayStatics['loadedHeaders']['templateName'][$i], true); $this->_xmlToolBox->endTag("xsl"); $this->_cacheXML->endTag("xsl"); } unset($this->_arrayStatics['loadedHeaders']); $this->_cacheXML->endTag("CoreHeaders"); $this->_xmlToolBox->endTag("CoreHeaders"); $this->_cacheXML->endTag("Loaded"); $this->_xmlToolBox->endTag("Loaded"); $this->_cacheXML->endTag("files"); $this->_xmlToolBox->endTag("files"); $this->_cacheXML->endTag("xsls"); $writeXML = new SLS_XMLToolbox($xslHandle); $writeXML->overwriteTags("//statics", $this->_cacheXML->getXML()); $writeXML->saveXML($this->_generic->getPathConfig("configSecure")."cache.xml"); } else $this->_xmlToolBox->addValue(SLS_String::substrAfterFirstDelimiter(SLS_String::substrBeforeLastDelimiter($xslHandle, "</xsls>"), "<xsls>")); $this->_xmlToolBox->endTag("XslStatics"); }
/** * Save the cache file if the cache is enabled * * @access public * @param string $xml the xml to save * @since 1.0 */ public function saveCacheXML($xml) { $cacheObjects = file_get_contents($this->_root.$this->_configSecurePath."/cache.xml"); $writeXML = new SLS_XMLToolbox($cacheObjects); $writeXML->overwriteTags("//statics", $xml); try { $xml = simplexml_load_string($writeXML->getXML()); $writeXML->saveXML($this->_root.$this->_configSecurePath."/cache.xml"); } catch (Exception $e) {} }