當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAppUI::flattenCachedLocales方法代碼示例

本文整理匯總了PHP中CAppUI::flattenCachedLocales方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::flattenCachedLocales方法的具體用法?PHP CAppUI::flattenCachedLocales怎麽用?PHP CAppUI::flattenCachedLocales使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAppUI的用法示例。


在下文中一共展示了CAppUI::flattenCachedLocales方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkInCache

 /**
  * check if the translation is cached
  *
  * @return bool
  */
 function checkInCache()
 {
     static $locales;
     if (!$locales) {
         $locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
     }
     return $this->_in_cache = isset($locales[$this->source]) && $locales[$this->source] == $this->translation;
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:13,代碼來源:CTranslationOverwrite.class.php

示例2: preg_match

    preg_match('#^//(\\d+)#', fgets($fp), $v);
    if ($v[1] < $version['build']) {
        CAppUI::stepAjax("Locales-javascript-cache-ko", UI_MSG_WARNING, $localeName);
        fclose($fp);
        continue;
    }
    if (null == SHM::get("locales-{$localeName}-" . CAppUI::LOCALES_PREFIX)) {
        CAppUI::stepAjax("Locales-shm-none", UI_MSG_OK, $localeName);
        continue;
    }
    // Load overwritten locales if the table exists
    $overwrite = new CTranslationOverwrite();
    if ($overwrite->isInstalled()) {
        $locales = $overwrite->transformLocales($locales);
    }
    $cached_locales = CAppUI::flattenCachedLocales($localeName);
    if ($cached_locales != $locales) {
        CAppUI::stepAjax("Locales-shm-ko", UI_MSG_WARNING, $localeName);
        continue;
    }
    CAppUI::stepAjax("Locales-shm-ok", UI_MSG_OK, $localeName);
}
// Not used yet (because of PHP 5.1)
//if (null == SHM::get("modules")) {
//  CAppUI::stepAjax("Modules-shm-none", UI_MSG_OK);
//}
////////// Configuration model
$cache_status = CConfiguration::getModelCacheStatus();
switch ($cache_status) {
    case "empty":
        CAppUI::stepAjax("ConfigModel-shm-none", UI_MSG_OK);
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:httpreq_check_shared_memory.php

示例3: array

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage developpement
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
$tabs = array();
foreach ($modules = CModule::getInstalled() as $module) {
    CAppUI::requireModuleFile($module->mod_name, "index");
    if (is_array($module->_tabs)) {
        foreach ($module->_tabs as $tab) {
            $tabs[$tab]["name"] = "mod-{$module->mod_name}-tab-{$tab}";
            $tabs[$tab]["locale"] = CValue::read($locales, $tabs[$tab]["name"]);
        }
    }
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("module", $modules);
$smarty->assign("tabs", $tabs);
$smarty->display("mnt_module_actions.tpl");
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:28,代碼來源:mnt_module_actions.php


注:本文中的CAppUI::flattenCachedLocales方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。