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


PHP WebRequest::checkSessionCookie方法代码示例

本文整理汇总了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
开发者ID:D66Ha,项目名称:mediawiki,代码行数:31,代码来源:Setup.php

示例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');
开发者ID:nzmichaelh,项目名称:wrdk,代码行数:31,代码来源:Setup.php


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