2017-09-25 04:21:49 +00:00
|
|
|
<?php
|
|
|
|
|
2022-02-16 04:08:28 +00:00
|
|
|
namespace Code\Lib;
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2017-09-04 22:23:42 +00:00
|
|
|
/**
|
2019-04-12 03:26:38 +00:00
|
|
|
* @brief Site configuration storage is built on top of the under-utilised xconfig.
|
2017-09-04 22:23:42 +00:00
|
|
|
*
|
|
|
|
* @see XConfig
|
|
|
|
*/
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
class SConfig
|
|
|
|
{
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
public static function Load($server_id)
|
|
|
|
{
|
|
|
|
return XConfig::Load('s_' . $server_id);
|
|
|
|
}
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
public static function Get($server_id, $family, $key, $default = false)
|
|
|
|
{
|
|
|
|
return XConfig::Get('s_' . $server_id, $family, $key, $default);
|
|
|
|
}
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
public static function Set($server_id, $family, $key, $value)
|
|
|
|
{
|
|
|
|
return XConfig::Set('s_' . $server_id, $family, $key, $value);
|
|
|
|
}
|
2017-09-25 04:21:49 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
public static function Delete($server_id, $family, $key)
|
|
|
|
{
|
|
|
|
return XConfig::Delete('s_' . $server_id, $family, $key);
|
|
|
|
}
|
2017-09-25 04:21:49 +00:00
|
|
|
}
|