當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。