本文整理匯總了PHP中Sessions::getGlobals方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sessions::getGlobals方法的具體用法?PHP Sessions::getGlobals怎麽用?PHP Sessions::getGlobals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sessions
的用法示例。
在下文中一共展示了Sessions::getGlobals方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSystemConstants
/**
* Return the System defined constants and Application variables
* Constants: SYS_*
* Sessions : USER_* , URS_*
*/
public function getSystemConstants($params = null)
{
$t1 = G::microtime_float();
$sysCon = array();
if (defined("SYS_LANG")) {
$sysCon["SYS_LANG"] = SYS_LANG;
}
if (defined("SYS_SKIN")) {
$sysCon["SYS_SKIN"] = SYS_SKIN;
}
if (defined("SYS_SYS")) {
$sysCon["SYS_SYS"] = SYS_SYS;
}
$sysCon["APPLICATION"] = isset($_SESSION["APPLICATION"]) ? $_SESSION["APPLICATION"] : "";
$sysCon["PROCESS"] = isset($_SESSION["PROCESS"]) ? $_SESSION["PROCESS"] : "";
$sysCon["TASK"] = isset($_SESSION["TASK"]) ? $_SESSION["TASK"] : "";
$sysCon["INDEX"] = isset($_SESSION["INDEX"]) ? $_SESSION["INDEX"] : "";
$sysCon["USER_LOGGED"] = isset($_SESSION["USER_LOGGED"]) ? $_SESSION["USER_LOGGED"] : "";
$sysCon["USR_USERNAME"] = isset($_SESSION["USR_USERNAME"]) ? $_SESSION["USR_USERNAME"] : "";
//###############################################################################################
// Added for compatibility betweek aplication called from web Entry that uses just WS functions
//###############################################################################################
if ($params != null) {
if (isset($params->option)) {
switch ($params->option) {
case "STORED SESSION":
if (isset($params->SID)) {
G::LoadClass("sessions");
$oSessions = new Sessions($params->SID);
$sysCon = array_merge($sysCon, $oSessions->getGlobals());
}
break;
}
}
if (isset($params->appData) && is_array($params->appData)) {
$sysCon["APPLICATION"] = $params->appData["APPLICATION"];
$sysCon["PROCESS"] = $params->appData["PROCESS"];
$sysCon["TASK"] = $params->appData["TASK"];
$sysCon["INDEX"] = $params->appData["INDEX"];
if (empty($sysCon["USER_LOGGED"])) {
$sysCon["USER_LOGGED"] = $params->appData["USER_LOGGED"];
$sysCon["USR_USERNAME"] = $params->appData["USR_USERNAME"];
}
}
}
return $sysCon;
}