DbAppSettingRepository
class DbAppSettingRepository implements AppSettingRepositoryInterface (View source)
Methods
Return the stored value + type for the given key, or null when no row exists.
Return every stored setting keyed by setting_key.
Return every stored setting whose key starts with the given prefix (e.g. "interface.") keyed by setting_key.
Insert or update the setting. The repository does not validate the type/value relationship - that is the service layer's job.
Remove the setting, falling back to ConfigurationManager / caller default.
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
__construct(PDO $db)
No description
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.