本文整理匯總了PHP中WebRequest::checkSessionCookie方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebRequest::checkSessionCookie方法的具體用法?PHP WebRequest::checkSessionCookie怎麽用?PHP WebRequest::checkSessionCookie使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WebRequest
的用法示例。
在下文中一共展示了WebRequest::checkSessionCookie方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: wfGetMainCache
Profiler::instance()->scopedProfileOut($ps_misc);
$ps_memcached = Profiler::instance()->scopedProfileIn($fname . '-memcached');
$wgMemc = wfGetMainCache();
$messageMemc = wfGetMessageCacheStorage();
$parserMemc = wfGetParserCacheStorage();
wfDebugLog('caches', 'main: ' . get_class($wgMemc) . ', message: ' . get_class($messageMemc) . ', parser: ' . get_class($parserMemc));
Profiler::instance()->scopedProfileOut($ps_memcached);
// Most of the config is out, some might want to run hooks here.
Hooks::run('SetupAfterCache');
$ps_session = Profiler::instance()->scopedProfileIn($fname . '-session');
if (!defined('MW_NO_SESSION') && !$wgCommandLineMode) {
// If session.auto_start is there, we can't touch session name
if (!wfIniGetBool('session.auto_start')) {
session_name($wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session');
}
if ($wgRequest->checkSessionCookie() || isset($_COOKIE[$wgCookiePrefix . 'Token'])) {
wfSetupSession();
}
}
Profiler::instance()->scopedProfileOut($ps_session);
$ps_globals = Profiler::instance()->scopedProfileIn($fname . '-globals');
/**
* @var Language $wgContLang
*/
$wgContLang = Language::factory($wgLanguageCode);
$wgContLang->initEncoding();
$wgContLang->initContLang();
// Now that variant lists may be available...
$wgRequest->interpolateTitle();
/**
* @var User $wgUser
示例2: elseif
$wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
} elseif ($wgSharedDB && in_array('user', $wgSharedTables)) {
$wgCookiePrefix = $wgSharedDB;
} elseif ($wgDBprefix) {
$wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
} else {
$wgCookiePrefix = $wgDBname;
}
}
$wgCookiePrefix = strtr($wgCookiePrefix, "=,; +.\"'\\[", "__________");
# If session.auto_start is there, we can't touch session name
#
if (!wfIniGetBool('session.auto_start')) {
session_name($wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session');
}
if (!$wgCommandLineMode && ($wgRequest->checkSessionCookie() || isset($_COOKIE[$wgCookiePrefix . 'Token']))) {
wfIncrStats('request_with_session');
wfSetupSession();
$wgSessionStarted = true;
} else {
wfIncrStats('request_without_session');
$wgSessionStarted = false;
}
wfProfileOut($fname . '-SetupSession');
wfProfileIn($fname . '-globals');
$wgContLang = new StubContLang();
// Now that variant lists may be available...
$wgRequest->interpolateTitle();
$wgUser = new StubUser();
$wgLang = new StubUserLang();
$wgOut = new StubObject('wgOut', 'OutputPage');