semitexa/platform-settings 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

semitexa/platform-settings

最新稳定版本:0.0.7

Composer 安装命令:

composer require semitexa/platform-settings

包简介

Semitexa Platform Settings system settings store for modules (multi-tenant aware)

README 文档

README

System settings store for modules. Any module can persist its own key-value settings. Multi-tenant aware: when tenancy is enabled, settings are isolated per tenant (tenant_id is injected automatically).

Usage in modules

Inject the contract and read/write by module key:

use Semitexa\Platform\Settings\Contract\SettingsStoreInterface;

// In your handler or service:
$this->settings->set('my-module', 'theme', 'dark');
$theme = $this->settings->get('my-module', 'theme');
$all = $this->settings->getAll('my-module');
$this->settings->remove('my-module', 'theme');
  • module_key: e.g. platform-user, platform-wm — identifies the owning module (max 128 chars).
  • key: setting name within the module (max 255 chars).
  • value: any JSON-serializable value (scalar, array, object).

WM app

The System Settings app appears on the platform desktop (icon ⚙). It opens /platform/settings and lists all stored settings grouped by module (read-only overview). Modules use SettingsStoreInterface programmatically to read/write.

Database

Table platform_settings is created/updated by the ORM sync. Run:

bin/semitexa orm:sync

(or docker compose exec app php vendor/bin/semitexa orm:sync). The collector discovers SettingResource (via #[FromTable]) and applies the schema diff.

Tenant behaviour

  • With tenancy disabled or no tenant resolved: tenant_id stays NULL; all settings are global.
  • With tenancy enabled and tenant resolved: tenant_id is set by the scope; each tenant has its own settings per (module_key, key).

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固