当前位置: 首页>>代码示例>>PHP>>正文


PHP SettingsManager::cacheSettings方法代码示例

本文整理汇总了PHP中SettingsManager::cacheSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP SettingsManager::cacheSettings方法的具体用法?PHP SettingsManager::cacheSettings怎么用?PHP SettingsManager::cacheSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SettingsManager的用法示例。


在下文中一共展示了SettingsManager::cacheSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ContentManager

// caching seocontent for current page
$oSEOContentManager->cacheContent();
$ogSEOContentManager->cacheContent();
// mail templates initialization
$ogMailTemplatesManager = new ContentManager($oDB, $ogFuseaction, $oLanguage, $fusebox['tableMailTemplatesTokens'], $fusebox['tableMailTemplates'], $fusebox['tableMailTemplatesComments'], false);
// checking if all is correct
if (!$ogMailTemplatesManager->initialize()) {
    _throw("FNoMailTemplatesTable", "There is no mail temlates table called \"{$fusebox['tableMailTemplates']}\" present in DB");
}
// settings manager initialization
$oSettingsManager = new SettingsManager($oDB, $fusebox['tableSettings']);
if (!$oSettingsManager->initialize()) {
    _throw("FNoSettingsTable", "There is no settings table called \"{$fusebox['tableSettings']}\" present in DB");
}
// retrieving settings
$oSettingsManager->cacheSettings();
// set website timezone
date_default_timezone_set($oSettingsManager->getValue("TimeZone", $fusebox['defaultTimeZone'], "STRING", "Default timezone for website"));
$oPropertyManager = new PropertyManager($oDB, $fusebox['tableProperties'], $fusebox['tableDictionary']);
// user manager initialization
$oUserManager = new UserManager($oDB, $fusebox['tableUsers'], $fusebox['defaultUser'], $fusebox['developer'], $fusebox['password']);
if (!$oUserManager->initialize()) {
    _throw("FNoUsersTable", "There is no users table called \"{$fusebox['tableUsers']}\" present in DB");
}
// adding or checking existence of developer, setting developer password to default
if (!$oUserManager->resetPassword($fusebox['developer'], 0, $fusebox['password'])) {
    if (!$oUserManager->checkUser($fusebox['developer'])) {
        $oDev = new User(0, $fusebox['developer']);
        $oDev->setRegisteredDate();
        $oDev->setPassword($fusebox['password']);
        if ($oUserManager->addUser($oDev)) {
开发者ID:rodionbykov,项目名称:zCMS,代码行数:31,代码来源:myGlobals.php


注:本文中的SettingsManager::cacheSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。