function __construct($sSessionLang = null, $nTimezone = null, $sSessionId = null) { //create an anonymous session $this->oUser = new AnwUserAnonymous(); $this->bResume = false; //session lang if (!$sSessionLang) { try { $sSessionLang = AnwUtils::detectPreferredLang(); } catch (AnwException $e) { AnwDebug::log("WARNING: Unable to detect preferred lang"); $sSessionLang = AnwComponent::globalCfgLangDefault(); } } $this->sLang = $sSessionLang; //session timezone if ($nTimezone === false) { $nTimezone = AnwComponent::globalCfgTimezoneDefault(); } $this->nTimezone = $nTimezone; //session id if (!$sSessionId) { $sSessionId = self::getNewSessionId(); } $this->sId = $sSessionId; $this->nTimeStart = time(); $this->nTimeSeen = time(); $this->nTimeAuth = 0; }