src/Request/Session.php
/**
	 * Config sessions
	 *
	 * @param string      $sessionName - name of the PHP session
	 * @param string|null $SID         start or restore session with own provided session ID,
	 */
Config sessions
@param string      $sessionName - name of the PHP session
@param string|null $SID         start or restore session with own provided session ID.
Config sessions @param string $sessionName - name of the PHP session @param string|null $SID start or restore session with own provided session ID .
public static function init(string $sessionName = 'PHPSESSID', string $SID = null)
	{
		if ($sessionName !== 'PHPSESSID') {
			$sessionName = "PHPSESSID_$sessionName";
		}
		self::$sessionName = $sessionName;
		if (self::$isStarted == false) {
			self::$isStarted = true;
			if (ini_get('session.auto_start') == 0) {
				if (headers_sent()) {
					debug_print_backtrace();
				}
				self::start($SID);
			}
		}
		self::setSID(session_id());
		$upTime  = self::get('_sessionUpdateTime', time());
		$between = time() - $upTime;
		if ($between > self::$timeout and $upTime > 0) {
			self::destroy(true);
			self::$isExpired = true;
		}
		else {
			self::$isExpired = false;
		}
		self::set('_sessionUpdateTime', time());
	}
public static function init ( string $ sessionName = 'PHPSESSID' , string $ SID = null ) { if ( $ sessionName !== 'PHPSESSID' ) { $ sessionName = " PHPSESSID_ $ sessionName " ; } self :: $ sessionName = $ sessionName ; if ( self :: $ isStarted == false ) { self :: $ isStarted = true ; if ( ini_get ( 'session.auto_start' ) == 0 ) { if ( headers_sent ( ) ) { debug_print_backtrace ( ) ; } self :: start ( $ SID ) ; } } self :: setSID ( session_id ( ) ) ; $ upTime = self :: get ( '_sessionUpdateTime' , time ( ) ) ; $ between = time ( ) - $ upTime ; if ( $ between > self :: $ timeout and $ upTime > 0 ) { self :: destroy ( true ) ; self :: $ isExpired = true ; } else { self :: $ isExpired = false ; } self :: set ( '_sessionUpdateTime' , time ( ) ) ; }
Config sessions
 @param string      $sessionName - name of the PHP session
 @param string|null $SID         start or restore session with own provided session ID,
Config sessions @param string $sessionName - name of the PHP session @param string|null $SID start or restore session with own provided session ID
//debug('session_id()', session_id()); //debug(self::$sessionName); //debug($_SESSION); //debug('------------------------------------------------');