本文整理汇总了PHP中ET::cache方法的典型用法代码示例。如果您正苦于以下问题:PHP ET::cache方法的具体用法?PHP ET::cache怎么用?PHP ET::cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ET
的用法示例。
在下文中一共展示了ET::cache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach (C("esoTalk.enabledPlugins") as $v) {
if (file_exists($file = PATH_PLUGINS . "/" . sanitizeFileName($v) . "/plugin.php")) {
include_once $file;
}
$className = "ETPlugin_{$v}";
if (!class_exists($className)) {
continue;
}
ET::$plugins[$v] = new $className("addons/plugins/" . $v);
ET::$plugins[$v]->boot();
}
}
//***** 6. INITIALIZE SESSION AND DATABASE, AND CACHE
// Initialize the cache.
$cacheClass = C("esoTalk.cache");
ET::$cache = ETFactory::make($cacheClass ? $cacheClass : "cache");
// Connect to the database.
ET::$database = ETFactory::make("database");
ET::$database->init(C("esoTalk.database.host"), C("esoTalk.database.user"), C("esoTalk.database.password"), C("esoTalk.database.dbName"), C("esoTalk.database.prefix"), C("esoTalk.database.connectionOptions"), C("esoTalk.database.port"));
// Initialize the session.
ET::$session = ETFactory::make("session");
// Check if any plugins need upgrading by comparing the versions in ET::$pluginInfo with the versions in
// ET::$config.
foreach (ET::$plugins as $k => $v) {
if (C("{$k}.version") != ET::$pluginInfo[$k]["version"]) {
if ($v->setup(C("{$k}.version"))) {
ET::writeConfig(array("{$k}.version" => ET::$pluginInfo[$k]["version"]));
}
}
}
//***** 7. PARSE REQUEST