本文整理汇总了PHP中CustomFieldData::forgetAllPhpCache方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomFieldData::forgetAllPhpCache方法的具体用法?PHP CustomFieldData::forgetAllPhpCache怎么用?PHP CustomFieldData::forgetAllPhpCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomFieldData
的用法示例。
在下文中一共展示了CustomFieldData::forgetAllPhpCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
global $freeze;
RedBeanDatabase::setup(Yii::app()->db->connectionString, Yii::app()->db->username, Yii::app()->db->password);
assert('RedBeanDatabase::isSetup()');
// Not Coding Standard
if ($freeze) {
$schemaFile = sys_get_temp_dir() . '/autobuilt.sql';
$success = preg_match("/;dbname=([^;]+)/", Yii::app()->db->connectionString, $matches);
// Not Coding Standard
assert('$success == 1');
// Not Coding Standard
$databaseName = $matches[1];
if (is_readable($schemaFile) && filesize($schemaFile) > 0) {
$systemOutput = system('mysql -u' . Yii::app()->db->username . ' -p' . Yii::app()->db->password . ' ' . $databaseName . " < {$schemaFile}");
if ($systemOutput != null) {
echo 'Loading schema using system command. Output: ' . $systemOutput . "\n\n";
}
} else {
echo "The schema file is not readable: {$schemaFile}. \n\n";
exit;
}
}
CustomFieldData::forgetAllPhpCache();
GeneralCache::forgetAll();
BeanModelCache::forgetAll();
if ($freeze) {
RedBeanDatabase::freeze();
TestDatabaseUtil::deleteRowsFromAllTablesExceptLog();
} else {
TestDatabaseUtil::deleteAllTablesExceptLog();
}
Yii::app()->user->userModel = null;
Yii::app()->user->clearStates();
//reset session.
Yii::app()->language = Yii::app()->getConfigLanguageValue();
Yii::app()->timeZoneHelper->setTimeZone(Yii::app()->getConfigTimeZoneValue());
Yii::app()->timeZoneHelper->load();
//resets timezone
Yii::app()->languageHelper->flushModuleLabelTranslationParameters();
if (static::$activateDefaultLanguages) {
Yii::app()->languageHelper->load();
Yii::app()->languageHelper->activateLanguagesForTesting();
Yii::app()->languageHelper->importMessagesForTesting();
}
}