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


PHP opToolkit::clearCache方法代码示例

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


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

示例1: save

 public function save()
 {
     foreach ($this->getValues() as $k => $v) {
         opSkinClassicConfig::set($k, $v);
     }
     opToolkit::clearCache();
 }
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:7,代码来源:opSkinClassicColorForm.class.php

示例2: executeCache

 public function executeCache(sfWebRequest $request)
 {
     $this->form = new sfForm();
     if ($request->isMethod(sfWebRequest::POST)) {
         $request->checkCSRFProtection();
         opToolkit::clearCache();
         $this->getUser()->setFlash('notice', 'Caches are now cleared.');
         $this->redirect('sns/cache');
     }
 }
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:10,代码来源:actions.class.php

示例3: save

 public function save()
 {
     if (!$this->isValid()) {
         return false;
     }
     $plugins = $this->getOption('plugins');
     foreach ($this->values as $key => $value) {
         $plugins[$key]->setIsActive($value);
     }
     opToolkit::clearCache();
     return true;
 }
开发者ID:phenom,项目名称:OpenPNE3,代码行数:12,代码来源:PluginActivationForm.class.php

示例4: save

 public function save()
 {
     $target = $this->getOption('target');
     $rawConfig = Doctrine::getTable('SkinConfig')->retrieveByPluginAndName('opSkinClassicPlugin', $target . '_image');
     if ($rawConfig) {
         $file = Doctrine::getTable('File')->findOneByName($rawConfig->value);
         if ($file) {
             $file->delete();
         }
     }
     $file = new File();
     $file->setFromValidatedFile($this->getValue('image'));
     $file->save();
     opSkinClassicConfig::set($target . '_image', $file->name);
     opToolkit::clearCache();
 }
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:16,代码来源:opSkinClassicImageForm.class.php

示例5: save

 public function save()
 {
     opSkinClassicConfig::set('theme', $this->getValue('theme'));
     foreach (opSkinClassicConfig::getAllowdColors() as $k) {
         opSkinClassicConfig::delete($k);
     }
     $configs = array_merge(opSkinClassicConfig::getImages(), opSkinClassicConfig::getThemeImages());
     foreach ($configs as $k) {
         $key = $k . '_image';
         $rawConfig = Doctrine::getTable('SkinConfig')->retrieveByPluginAndName('opSkinClassicPlugin', $key);
         if ($rawConfig) {
             $file = Doctrine::getTable('File')->findOneByName($rawConfig->value);
             if ($file) {
                 $file->delete();
             }
         }
         opSkinClassicConfig::delete($key);
     }
     opToolkit::clearCache();
 }
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:20,代码来源:opSkinClassicPresetForm.class.php

示例6: chdir

<?php

if (!isset($app)) {
    $app = 'pc_frontend';
}
chdir(dirname(__FILE__) . '/../../../..');
require_once 'config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
sfContext::createInstance($configuration);
opToolkit::clearCache();
开发者ID:te-koyama,项目名称:openpne,代码行数:10,代码来源:functional.php

示例7: save

 public function save()
 {
     Doctrine::getTable('SnsConfig')->set('customizing_css', $this->getValue('css'));
     opToolkit::clearCache();
 }
开发者ID:phenom,项目名称:OpenPNE3,代码行数:5,代码来源:opCustomCssForm.class.php

示例8: save

 public function save()
 {
     if (!$this->isValid()) {
         return false;
     }
     $plugins = $this->getOption('plugins');
     $values = $this->values[$this->pluginFieldKey];
     foreach ($plugins as $plugin) {
         if (is_array($values) && in_array($plugin->getName(), $values) || $values === $plugin->getName()) {
             $plugin->setIsActive(true);
         } else {
             $plugin->setIsActive(false);
         }
     }
     opToolkit::clearCache();
     return true;
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:17,代码来源:PluginActivationForm.class.php


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