feat: theming
All checks were successful
JS Unit Tests / test (pull_request) Successful in 17s
Build Test / build (pull_request) Successful in 19s
PHP Unit Tests / test (pull_request) Successful in 54s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-22 21:25:26 -05:00
parent 6975800ce5
commit b68ac538ce
7 changed files with 331 additions and 45 deletions

View File

@@ -7,9 +7,9 @@ use KTXC\Stores\TenantStore;
class TenantService
{
public function __construct(protected readonly TenantStore $store)
{
}
public function __construct(
protected readonly TenantStore $store,
) {}
public function fetchByDomain(string $domain): ?TenantObject
{
@@ -21,4 +21,31 @@ class TenantService
return $this->store->fetch($identifier);
}
// =========================================================================
// Settings
// =========================================================================
/**
* Fetch all or a filtered subset of a tenant's settings.
*
* @param string $identifier Tenant identifier
* @param string[] $keys Optional list of keys to return; empty = all
*
* @return array<string, mixed>
*/
public function fetchSettings(string $identifier, array $keys = []): array
{
return $this->store->fetchSettings($identifier, $keys);
}
/**
* Merge-update settings for a tenant.
*
* @param string $identifier Tenant identifier
* @param array<string, mixed> $settings Key-value pairs to persist
*/
public function storeSettings(string $identifier, array $settings): bool
{
return $this->store->storeSettings($identifier, $settings);
}
}