本文整理匯總了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();
}
示例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');
}
}
示例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;
}
示例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();
}
示例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();
}
示例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();
示例7: save
public function save()
{
Doctrine::getTable('SnsConfig')->set('customizing_css', $this->getValue('css'));
opToolkit::clearCache();
}
示例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;
}