當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WoW::CatchOperations方法代碼示例

本文整理匯總了PHP中WoW::CatchOperations方法的典型用法代碼示例。如果您正苦於以下問題:PHP WoW::CatchOperations方法的具體用法?PHP WoW::CatchOperations怎麽用?PHP WoW::CatchOperations使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WoW的用法示例。


在下文中一共展示了WoW::CatchOperations方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

        if (!file_exists($classFileName)) {
            die('<strong>Autoload Fatal Error:</strong> unable to autoload class ' . $className . ' (path: ' . $classFileName . ')!');
        }
        include $classFileName;
    }
}
// Initialize debug log
WoW_Log::Initialize(WoWConfig::$UseLog, WoWConfig::$LogLevel);
// Load databases configs
// Do not create DB connections here - it will be created automatically at first query request!
DB::LoadConfigs();
// Core self testing
WoW::SelfTests();
// Try to catch some operations (login, logout, etc.)
$locale_loaded = false;
WoW::CatchOperations($locale_loaded);
// locale from page controller
$wow_locale_cms = isset($_COOKIE['wow_locale']) ? $_COOKIE['wow_locale'] : WoWConfig::$DefaultLocale;
if (!isset($_COOKIE['wow_locale'])) {
    setcookie('wow_locale', $wow_locale_cms, strtotime('NEXT YEAR'), '/');
    $_COOKIE['wow_locale'] = $wow_locale_cms;
}
$pController = new PageController();
if ($pController->GetLocale() != null && $pController->GetLocale() != $_COOKIE['wow_locale']) {
    //$_SESSION['wow_locale'] = $pController->GetLocale();
    WoW_Locale::SetLocale($pController->GetLocale(), WoW_Locale::GetLocaleIDForLocale($pController->GetLocale()), true);
} else {
    WoW_Locale::SetLocale($_COOKIE['wow_locale'], WoW_Locale::GetLocaleIDForLocale($_COOKIE['wow_locale']));
}
// Initialize account (if user already logged in we need to re-build his info from session data)
WoW_Account::Initialize();
開發者ID:JunkyBulgaria,項目名稱:WoWCS,代碼行數:31,代碼來源:WoW_Loader.php


注:本文中的WoW::CatchOperations方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。