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