本文整理汇总了PHP中erLhcoreClassTemplate::strip_html方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassTemplate::strip_html方法的具体用法?PHP erLhcoreClassTemplate::strip_html怎么用?PHP erLhcoreClassTemplate::strip_html使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassTemplate
的用法示例。
在下文中一共展示了erLhcoreClassTemplate::strip_html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch
//.........这里部分代码省略.........
}
// Compile override config settings
$Matches = array();
preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getOverrideValue\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erConfigClassLhConfig::getInstance()->getOverrideValue($Matches[2][$key], $Matches[5][$key]);
$valueReplace = '';
if (is_bool($valueConfig)) {
$valueReplace = $valueConfig == false ? 'false' : 'true';
} elseif (is_integer($valueConfig)) {
$valueReplace = $valueConfig;
} elseif (is_array($valueConfig)) {
$valueReplace = var_export($valueConfig, true);
} else {
$valueReplace = '\'' . $valueConfig . '\'';
}
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
$Matches = array();
preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
$valueReplace = '';
if (is_bool($valueConfig)) {
$valueReplace = $valueConfig == false ? 'false' : 'true';
} elseif (is_integer($valueConfig)) {
$valueReplace = $valueConfig;
} elseif (is_array($valueConfig)) {
$valueReplace = var_export($valueConfig, true);
} else {
$valueReplace = $valueConfig;
}
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
// Compile config settings
$Matches = array();
preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $var) {
$valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
$valueReplace = '';
if (is_bool($valueConfig)) {
$valueReplace = $valueConfig == false ? 'false' : 'true';
} elseif (is_integer($valueConfig)) {
$valueReplace = $valueConfig;
} elseif (is_array($valueConfig)) {
$valueReplace = var_export($valueConfig, true);
} else {
$valueReplace = '\'' . $valueConfig . '\'';
}
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
if ($this->cacheDbVariables == true) {
// Compile config completely
$Matches = array();
preg_match_all('/<\\?php echo erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value(.*?)\\?\\>/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
$contentFile = str_replace($Matches[0][$key], $valueConfig, $contentFile);
}
// Compile config settings in php scripts
$Matches = array();
preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
$valueReplace = '';
$valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
// Compile config settings in php scripts
$Matches = array();
preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data_value/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data_value;
$valueReplace = var_export($valueConfig, true);
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
// Compile config settings array
$Matches = array();
preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data\\[\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\]/i', $contentFile, $Matches);
foreach ($Matches[1] as $key => $UrlAddress) {
$valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data[$Matches[4][$key]];
$valueReplace = '';
$valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
$contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
}
}
// Compile content language
$contentFile = str_replace('<?php echo erLhcoreClassSystem::instance()->ContentLanguage?>', erLhcoreClassSystem::instance()->ContentLanguage, $contentFile);
// Compile siteaccess
$contentFile = str_replace('erLhcoreClassSystem::instance()->SiteAccess', '\'' . erLhcoreClassSystem::instance()->SiteAccess . '\'', $contentFile);
// Atomoc template compilation to avoid concurent request compiling and writing to the same file
$fileName = 'cache/compiledtemplates/' . md5(time() . rand(0, 1000) . microtime() . $file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
file_put_contents($fileName, erLhcoreClassTemplate::strip_html($contentFile));
$file = 'cache/compiledtemplates/' . md5($file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
rename($fileName, $file);
$this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)] = $file;
$this->storeCache();
}
return $this->fetchExecute($file);
}