__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Utils;
final class SessionCache
{
private static function key(): string
{
global $cfg, $server;
$key = 'server_' . $server;
if (isset($cfg['Server']['user'])) {
return $key . '_' . $cfg['Server']['user'];
}
return $key;
}
public static function has(string $name): bool
{
return isset($_SESSION['cache'][self::key()][$name]);
}
/**
* @return mixed|null
*/
public static function get(string $name, ?callable $defaultValueCallback = null)
{
if (self::has($name)) {
return $_SESSION['cache'][self::key()][$name];
}
if ($defaultValueCallback !== null) {
$value = $defaultValueCallback();
self::set($name, $value);
return $value;
}
return null;
}
/**
* @param mixed $value
*/
public static function set(string $name, $value): void
{
$_SESSION['cache'][self::key()][$name] = $value;
}
public static function remove(string $name): void
{
unset($_SESSION['cache'][self::key()][$name]);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ForeignKey.php | File | 2.27 KB | 0644 |
|
| FormatConverter.php | File | 1.81 KB | 0644 |
|
| Gis.php | File | 9.48 KB | 0644 |
|
| HttpRequest.php | File | 9.01 KB | 0644 |
|
| SessionCache.php | File | 1.17 KB | 0644 |
|