N°3985 - Performance checks on the back end - Use Session helper

This commit is contained in:
Eric
2021-08-26 10:27:26 +02:00
parent 2c2155a8e0
commit bd9286f903
13 changed files with 135 additions and 97 deletions

View File

@@ -19,10 +19,12 @@ use ExecutionKPI;
class Session
{
public static $iSessionId = null;
public static $bSessionStarted = false;
protected static $bIsInitialized = false;
protected static $bSessionStarted = false;
public static function Start()
{
self::$bIsInitialized = true;
if (!self::$bSessionStarted) {
$oKPI = new ExecutionKPI();
session_name('itop-'.md5(APPROOT));
@@ -140,6 +142,7 @@ class Session
} else {
$sSessionVar = &$sSessionVar[$key];
}
return isset($sSessionVar);
}
@@ -148,4 +151,19 @@ class Session
return array_keys($_SESSION);
}
/**
* @return bool
*/
public static function IsInitialized(): bool
{
return self::$bIsInitialized;
}
/**
* @return bool|string
*/
public static function GetLog()
{
return print_r($_SESSION, true);
}
}