interface AppSettingRepositoryInterface (View source)

Persistence boundary for generic admin-managed settings layered above config/settings.php. Keys use dotted notation (e.g. "interface.theme") so they map cleanly onto ConfigurationManager groups during fallback.

Values are stored as strings with a separate type hint; the service layer (AppSettingsService) casts on read.

Methods

array|null
find(string $key)

Return the stored value + type for the given key, or null when no row exists.

array
findAll()

Return every stored setting keyed by setting_key.

array
findByPrefix(string $prefix)

Return every stored setting whose key starts with the given prefix (e.g. "interface.") keyed by setting_key.

void
save(string $key, string $value, string $type = 'string')

Insert or update the setting. The repository does not validate the type/value relationship - that is the service layer's job.

void
delete(string $key)

Remove the setting, falling back to ConfigurationManager / caller default.

bool
isReady()

Whether the backing table is available. False on installations where the migration hasn't been applied yet, letting consumers degrade to the legacy ConfigurationManager-only path.

Details

array|null find(string $key)

Return the stored value + type for the given key, or null when no row exists.

Parameters

string $key

Return Value

array|null

array findAll()

Return every stored setting keyed by setting_key.

Return Value

array

array findByPrefix(string $prefix)

Return every stored setting whose key starts with the given prefix (e.g. "interface.") keyed by setting_key.

Parameters

string $prefix

Return Value

array

void save(string $key, string $value, string $type = 'string')

Insert or update the setting. The repository does not validate the type/value relationship - that is the service layer's job.

Parameters

string $key
string $value
string $type

Return Value

void

void delete(string $key)

Remove the setting, falling back to ConfigurationManager / caller default.

Parameters

string $key

Return Value

void

bool isReady()

Whether the backing table is available. False on installations where the migration hasn't been applied yet, letting consumers degrade to the legacy ConfigurationManager-only path.

Return Value

bool