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