当前位置: 首页>>代码示例>>PHP>>正文


PHP eZPHPCreator::addRawVariable方法代码示例

本文整理汇总了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();
 }
开发者ID:legende91,项目名称:ez,代码行数:24,代码来源:eztranslationcache.php

示例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;
开发者ID:pascalvb,项目名称:eZ-ExtensionLoader,代码行数:67,代码来源:ymcextensionloader.php


注:本文中的eZPHPCreator::addRawVariable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。