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


PHP Registry::cleanup方法代码示例

本文整理汇总了PHP中Tygh\Registry::cleanup方法的典型用法代码示例。如果您正苦于以下问题:PHP Registry::cleanup方法的具体用法?PHP Registry::cleanup怎么用?PHP Registry::cleanup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tygh\Registry的用法示例。


在下文中一共展示了Registry::cleanup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fn_clear_cache

/**
 * Clears cache - all or by type
 * @param string $type cache type (misc, registry, static or all)
 * @param string $extra extra data to pass to cache clear function
 */
function fn_clear_cache($type = 'all', $extra = '')
{
    if ($type == 'misc' || $type == 'all') {
        fn_rm(fn_get_cache_path(false), false);
    }
    if ($type == 'assets' || $type == 'all' || $type == 'statics') {
        // FIXME: backward compatibility for "statics"
        Storage::instance('assets')->deleteDir($extra);
        fn_set_storage_data('cache_id', time());
    }
    if ($type == 'registry' || $type == 'all') {
        Registry::cleanup();
    }
    // static cache does not reset when all cache is reset
    if ($type == 'static') {
        fn_rm(Registry::get('config.dir.cache_static'));
    }
    fn_set_hook('clear_cache_post', $type, $extra);
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:24,代码来源:fn.common.php

示例2: fn_clear_cache

/**
 * Clears cache - all or by type
 * @param string $type cache type (misc, registry, static or all)
 * @param string $extra extra data to pass to cache clear function
 */
function fn_clear_cache($type = 'all', $extra = '')
{
    if ($type == 'misc' || $type == 'all') {
        fn_rm(Registry::get('config.dir.cache_misc'), false);
    }
    if ($type == 'statics' || $type == 'all') {
        Storage::instance('statics')->deleteDir($extra);
        fn_set_storage_data('cache_id', time());
    }
    if ($type == 'registry' || $type == 'all') {
        Registry::cleanup();
    }
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:18,代码来源:fn.common.php

示例3: updateValue

 /**
  * Updates value of setting by section name and setting name
  *
  * @param  string $section_name        Section name
  * @param  string $setting_name        Setting name
  * @param  string $setting_value       Setting value
  * @param  bool   $force_cache_cleanup Force registry cleanup after setting was updated
  * @param  int    $company_id          Company identifier
  * @return bool   Always true
  */
 public function updateValue($setting_name, $setting_value, $section_name = '', $force_cache_cleanup = false, $company_id = null, $execute_functions = true)
 {
     if (!empty($setting_name)) {
         $object_id = $this->getId($setting_name, $section_name);
         $this->updateValueById($object_id, $setting_value, $company_id, $execute_functions);
         if ($force_cache_cleanup) {
             Registry::cleanup();
         }
     }
     return true;
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:21,代码来源:Settings.php

示例4: array

            $missed_languages = array_diff($_all_languages, $_lcs);
            if (!empty($missed_languages)) {
                $descriptions = array('name' => $n, 'value' => $lcs['EN']);
                foreach ($missed_languages as $descriptions['lang_code']) {
                    $row = db_get_field("SELECT name FROM ?:language_values WHERE name = ?s AND lang_code = ?s", $descriptions['name'], $descriptions['lang_code']);
                    if (empty($row)) {
                        db_query("REPLACE INTO ?:language_values ?e", $descriptions);
                    }
                }
            }
        }
    }
    // Install templates
    $areas = array('customer', 'admin', 'mail');
    $installed_skins = fn_get_dir_contents(Registry::get('config.dir.skins'));
    //	foreach ($installed_skins as $skin_name) {
    //		foreach ($areas as $area) {
    //			if (is_dir(Registry::get('config.dir.skins')_REPOSITORY . 'base/' . $area . '/addons/' . $addon)) {
    //				fn_rm(Registry::get('config.dir.skins') . $skin_name . '/' . $area . '/addons/' . $addon);
    //				fn_copy(Registry::get('config.dir.skins')_REPOSITORY . 'base/' . $area . '/addons/' . $addon, Registry::get('config.dir.skins') . $skin_name . '/' . $area . '/addons/' . $addon);
    //			}
    //		}
    //	}
    $data = array('option_name' => 'review_attributes_version', 'option_type' => 'I', 'value' => REVIEW_ATTRIBUTES_VERSION);
    db_query("REPLACE INTO ?:settings ?e", $data);
    fn_rm(DIR_COMPILED, false);
    fn_rm(DIR_CACHE, false);
    Registry::cleanup();
    fn_set_notification('N', __('notice'), __('upgrade_completed'));
    return array(CONTROLLER_STATUS_REDIRECT, "review_attributes.manage");
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:review_attributes.php


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