Files
im/support/OpenImSdk/Core/Config.php
T

40 lines
708 B
PHP
Raw Normal View History

2025-11-22 15:31:01 +08:00
<?php
namespace support\OpenImSdk\Core;
class Config
{
private static $config = [
'host' => 'http://127.0.0.1:10002',
'secret' => 'openIM123',
];
/**
* 设置配置项
* @param array $config
* @return void
*/
public static function setConfig(array $config)
{
self::$config = array_merge(self::$config, $config);
}
/**
* 获取密钥
* @return string
*/
public static function getSecret(): string
{
return self::$config['secret'];
}
/**
* 获取API主机地址
* @return string
*/
public static function getHost(): string
{
return self::$config['host'];
}
}