本文整理汇总了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;
}