Checks session integrity according to session configuration

@param string $variableName
@return bool
428345
public static function check(string $variableName = '_MF_SESSION_INTEGRITY_TOKEN_'): bool
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $userToken = $vHandler->session->get($variableName, $vHandler::TYPE_STRING);
        $httpReferer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
        $rIntegrity = static::$refererIntegrityEnabled ? \stripos($httpReferer, static::$serverName) !== false : true;
        $tIntegrity = static::$tokenIntegrityEnabled ? $userToken === static::buildToken() : true;
        return $rIntegrity && $tIntegrity;
    }
1307933
public function has($name)
	{
		if($this->_state !== self::STATE_ACTIVE) {
			throw new LibSessionsException("Session isn't active!\n");
		}

		return isset($_SESSION[$this->_namespace][$name]);
	}
432853
public static function setRevalidationCounter(string $variableName = '_MF_SESSION_REVALIDATION_COUNTER_',
                                                  int $value = 0): void
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $vHandler->session->set($variableName, $value);
    }
417662
public function hasProperty($propertyName)
    {
        if (is_object($this->contentObjectProxy)) {
            return ObjectAccess::isPropertyGettable($this->contentObjectProxy->getObject(), $propertyName);
        }
        return array_key_exists($propertyName, $this->properties);
    }
602545
public static function getGetPostSession($variableName)
    {

        $value = null;

        if (isset($_SESSION[$variableName])) {
            $value = $_SESSION[$variableName];
        }

        $postGetValue = self::getGetPost($variableName);

        if ($postGetValue !== null) {
            $value                   = $postGetValue;
            $_SESSION[$variableName] = $value;
        }

        return $value;
    }
234851
public function setSession($varname, $varval)
    {
        $this->alteredsession = true;
        $this->sessionvars[$varname] = $varval;
        return $this;
    }
440097
public function getConfigVariable($variable)
    {
        if (empty($variable)) return false;

        if (!property_exists($this->setting, $variable)) return false;

        return $this->setting->$variable;
    }
434248
public function check()
    {
        $response = $this->client->get($this->getURL());
        $cookie = $this->getCookie($response);
        $fullURL = $this->getURL();

        if ($cookie) {
            return [
                EnvironmentCheck::ERROR,
                "Sessions are being set for {$fullURL} : Set-Cookie => " . $cookie,
            ];
        }
        return [
            EnvironmentCheck::OK,
            "Sessions are not being created for {$fullURL} 👍",
        ];
    }
687965
public function isUserValid4UserName($username)
    {
        $result = false;
        $user = $this->getUser4UserName($username);
        if (!$user) {
            $result = null;
        } elseif ($user->getRoles()) {
            $result = true;
        }

        return $result;
    }
297365
protected function tableExists($tableName)
    {
        $tables = $this->connection->getSchemaManager()->listTables();

        foreach ($tables as $table) {
            if ($table->getName() == $tableName) {
                return true;
            }
        }

        return false;
    }
1234580
public function isSessionAttribute($key) {
        if ($this->isSession() || $this->hasSessionId())
            return $this->getSession()->isAttribute($key);
        return false;
    }
1032045
public function exists( $key ) {
		if ( ! $this->is_valid_session() ) {
			return false;
		}

		$key = $this->get_session_key( $key );
		if ( ! array_key_exists( $key, $_SESSION ) ) {
			return false;
		}

		return ! $this->_expired( $_SESSION[ $key ] );
	}
1020103
function isVariableModified( $blockName, $varName )
    {
        return ( isset( $this->ModifiedBlockValues[$blockName][$varName] ) and
                 $this->ModifiedBlockValues[$blockName][$varName] );
    }
113950
public function exists($key) {
        $key = $this->secureKey($key);
        
        if (isset($_SESSION[$key])) return true;
        
        return false;
    }
1062014
public static function check($name) {
		if (empty($name)) {
			return false;
		}

		return Hash::get($_SESSION, $name) !== null;
	}
601359
private function isSessionValid(array $session)
    {
        $halfHourBeforeExpiration = $session['expiration'] - (SessionPoolInterface::SESSION_EXPIRATION_SECONDS / 2);

        if ($this->time() < $halfHourBeforeExpiration) {
            return true;
        } elseif ($halfHourBeforeExpiration < $this->time() && $this->time() < $session['expiration']) {
            return $this->database
                ->session($session['name'])
                ->exists();
        }

        return false;
    }
1237118
private function has($key) {
		return isset($_SESSION[self::SESSION_KEY_FLASH]) && isset($_SESSION[self::SESSION_KEY_FLASH][$key]);
	}