本文整理汇总了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)) {