本文整理匯總了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();
}
}