- PHP 客户端 (kenaito-conf-php-client) - .NET 客户端 (kenaito-conf-dotnet-client) - C 客户端 (kenaito-conf-c-client) - C++ 客户端 (kenaito-conf-cpp-client) - Lua 客户端 (kenaito-conf-lua-client) - Kotlin 客户端 (kenaito-conf-kotlin-client) - Rust 客户端 (kenaito-conf-rust-client) - Ruby 客户端 (kenaito-conf-ruby-client) 每个客户端包含完整的 SDK 实现和 demo 示例,支持: - 配置拉取(全量/增量) - AES-128-CBC 解密 - 本地缓存 - 变更回调 - Token 认证 更新根目录 README.md: - 技术栈列表新增 8 种语言 - 项目结构新增 16 个目录 - 客户端接入章节新增 8 个使用示例
25 lines
548 B
PHP
25 lines
548 B
PHP
<?php
|
|
|
|
namespace KenaitoConf;
|
|
|
|
class Config
|
|
{
|
|
public string $baseUrl = '';
|
|
public string $appName = '';
|
|
public string $env = 'dev';
|
|
public string $version = 'latest';
|
|
public string $token = '';
|
|
public int $syncInterval = 60;
|
|
public bool $ignoreGlobal = false;
|
|
public string $cacheDir = '.';
|
|
|
|
public function __construct(array $options = [])
|
|
{
|
|
foreach ($options as $key => $value) {
|
|
if (property_exists($this, $key)) {
|
|
$this->$key = $value;
|
|
}
|
|
}
|
|
}
|
|
}
|