本文整理汇总了PHP中eZPHPCreator::addRawVariable方法的典型用法代码示例。如果您正苦于以下问题:PHP eZPHPCreator::addRawVariable方法的具体用法?PHP eZPHPCreator::addRawVariable怎么用?PHP eZPHPCreator::addRawVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZPHPCreator
的用法示例。
在下文中一共展示了eZPHPCreator::addRawVariable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: storeCache
static function storeCache($key)
{
$translationCache = eZTranslationCache::cacheTable();
if (!isset($translationCache[$key])) {
eZDebug::writeWarning("Translation cache for key '{$key}' does not exist, cannot store cache", __METHOD__);
return;
}
$internalCharset = eZTextCodec::internalCharset();
// $cacheFileKey = "$key-$internalCharset";
$cacheFileKey = $key;
$cacheFileName = md5($cacheFileKey) . '.php';
$cache =& $translationCache[$key];
if (!file_exists(eZTranslationCache::cacheDirectory())) {
eZDir::mkdir(eZTranslationCache::cacheDirectory(), false, true);
}
$php = new eZPHPCreator(eZTranslationCache::cacheDirectory(), $cacheFileName);
$php->addRawVariable('eZTranslationCacheCodeDate', self::CODE_DATE);
$php->addSpace();
$php->addRawVariable('CacheInfo', array('charset' => $internalCharset));
$php->addRawVariable('TranslationInfo', $cache['info']);
$php->addSpace();
$php->addRawVariable('TranslationRoot', $cache['root']);
$php->store();
}
示例2: registerExtensions
//.........这里部分代码省略.........
}
//We are about to activate a new extension which might need to load one ore more other extension (if we do not have a cached info about this)
$allExtensionsRegistered = $cache_hit;
}
}
}
$this->rebuildIniOverrideArray($siteaccess, $isBasicLoad);
if (!$allExtensionsRegistered) {
$additional_lookups++;
}
}
if (!$cache_hit) {
if ($isBasicLoad) {
eZDebug::writeNotice("Loaded all basic extensions in {$additional_lookups} additional lookups...", __METHOD__);
} else {
if ($is_virtual_load) {
eZDebug::writeNotice("Loaded all virtual siteaccess extensions in {$additional_lookups} additional lookups...", __METHOD__);
} else {
eZDebug::writeNotice("Loaded all siteaccess extensions in {$additional_lookups} additional lookups...", __METHOD__);
}
}
}
if ($write_cache) {
if ($isBasicLoad) {
eZDebug::writeNotice("Storing basic extension load information into cache file '{$cacheFilePath}'...", __METHOD__);
} else {
if ($is_virtual_load) {
eZDebug::writeNotice("Storing virtual siteaccess extension load information into cache file '{$cacheFilePath}'...", __METHOD__);
} else {
eZDebug::writeNotice("Storing siteaccess extension load information into cache file '{$cacheFilePath}'...", __METHOD__);
}
}
$php = new eZPHPCreator($cacheDir, $cacheFileName);
$php->addRawVariable($cache_var_name, $this->registeredExtensions);
$php->store();
}
if ($is_virtual_load) {
$this->virtualLoadingCompleted = true;
eZDebug::accumulatorStop('OpenVolanoExtensionLoader_VirtualSiteaccess');
} else {
if (!$isBasicLoad) {
$this->standardLoadingCompleted = true;
$this->non_virtual_siteaccess_name = $siteaccess;
eZDebug::accumulatorStop('OpenVolanoExtensionLoader_Siteaccess');
} else {
self::$earlyLoadingCompleted = true;
eZDebug::accumulatorStop('OpenVolanoExtensionLoader_Basic');
}
}
//Use the following line to take a look into the ini-hierarchy...
//ymc_pr($GLOBALS["eZINIOverrideDirList"], $siteaccess.'|'.self::getCurrentSiteaccess());
if (!$is_virtual_load and !$isBasicLoad and $ini->hasVariable('SiteAccessSettings', 'VirtualSiteaccessSystem') and $ini->variable('SiteAccessSettings', 'VirtualSiteaccessSystem') !== 'disabled') {
$allowLoadingOfPreviouslyKnownSiteaccesses = false;
if ($ini->hasVariable('SiteAccessSettings', 'VirtualSiteaccessSystem') and $ini->variable('VirtualSiteaccessSettings', 'AllowLoadingOfPerviouslyKnowSiteaccesses') === 'enabled') {
$allowLoadingOfPreviouslyKnownSiteaccesses = true;
}
if (isset($GLOBALS['eZURIRequestInstance']) and is_object($GLOBALS['eZURIRequestInstance'])) {
$uri = eZURI::instance();
$elements = $uri->elements(false);
if (count($elements) > 0 and $elements[0] != '') {
$goInVirtualSiteaccessMode = true;
if ($ini->hasVariable('VirtualSiteaccessSettings', 'SkipLoadingForUri') and is_array($ini->variable('VirtualSiteaccessSettings', 'SkipLoadingForUri')) and count($ini->variable('VirtualSiteaccessSettings', 'SkipLoadingForUri')) > 0) {
$uri_string = $uri->elements(true);
foreach ($ini->variable('VirtualSiteaccessSettings', 'SkipLoadingForUri') as $ignoreUriForVirtualSiteaccess) {
if (strpos($uri_string, $ignoreUriForVirtualSiteaccess) === 0) {
$goInVirtualSiteaccessMode = false;