本文整理汇总了PHP中oxSession::_blIsNewSession方法的典型用法代码示例。如果您正苦于以下问题:PHP oxSession::_blIsNewSession方法的具体用法?PHP oxSession::_blIsNewSession怎么用?PHP oxSession::_blIsNewSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxSession
的用法示例。
在下文中一共展示了oxSession::_blIsNewSession方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start
/**
* Starts shop session, generates unique session ID, extracts user IP.
*/
public function start()
{
$myConfig = $this->getConfig();
$sid = null;
if ($this->isAdmin()) {
$this->setName("admin_sid");
} else {
$this->setName("sid");
}
$sForceSidParam = $myConfig->getRequestParameter($this->getForcedName());
$sSidParam = $myConfig->getRequestParameter($this->getName());
//forcing sid for SSL<->nonSSL transitions
if ($sForceSidParam) {
$sid = $sForceSidParam;
} elseif ($this->_getSessionUseCookies() && $this->_getCookieSid()) {
$sid = $this->_getCookieSid();
} elseif ($sSidParam) {
$sid = $sSidParam;
}
//starting session if only we can
if ($this->_allowSessionStart()) {
//creating new sid
if (!$sid) {
self::$_blIsNewSession = true;
$this->initNewSession();
} else {
self::$_blIsNewSession = false;
$this->_setSessionId($sid);
$this->_sessionStart();
}
//special handling for new ZP cluster session, as in that case session_start() regenerates id
if ($this->_sId != session_id()) {
$this->_setSessionId(session_id());
}
//checking for swapped client
$blSwapped = $this->_isSwappedClient();
if (!self::$_blIsNewSession && $blSwapped) {
$this->initNewSession();
// passing notification about session problems
if ($this->_sErrorMsg && $myConfig->getConfigParam('iDebug')) {
oxRegistry::get("oxUtilsView")->addErrorToDisplay(oxNew("oxException", $this->_sErrorMsg));
}
} elseif (!$blSwapped) {
// transferring cookies between hosts
oxRegistry::get("oxUtilsServer")->loadSessionCookies();
}
}
}