StandaloneSettingsWriteService
in package
implements
SettingsWriteServiceInterface
Standalone settings write service using Laravel Query Builder only.
Clean implementation without Propel references or class_exists checks. Handles the AtoM setting storage pattern: object -> setting -> setting_i18n.
Table of Contents
Interfaces
- SettingsWriteServiceInterface
- Contract for settings persistence.
Methods
- delete() : bool
- Delete a setting by name and optional scope.
- save() : void
- Save a setting value (non-localized).
- saveLocalized() : void
- Save a localized (i18n) setting value.
- saveMany() : void
- Bulk-save multiple settings at once.
- saveSerialized() : void
- Save a serialized array value as a setting.
Methods
delete()
Delete a setting by name and optional scope.
public
delete(string $name[, string|null $scope = null ]) : bool
Parameters
- $name : string
- $scope : string|null = null
Return values
bool —True if the setting existed and was deleted
save()
Save a setting value (non-localized).
public
save(string $name, mixed $value[, string|null $scope = null ]) : void
Creates the setting if it doesn't exist, updates if it does.
Parameters
- $name : string
-
Setting name (e.g., 'hits_per_page')
- $value : mixed
-
Setting value
- $scope : string|null = null
-
Optional scope (e.g., 'ldap', 'oai')
saveLocalized()
Save a localized (i18n) setting value.
public
saveLocalized(string $name, mixed $value, string $culture[, string|null $scope = null ]) : void
Parameters
- $name : string
-
Setting name
- $value : mixed
-
Setting value
- $culture : string
-
Culture code (e.g., 'en', 'af')
- $scope : string|null = null
-
Optional scope
saveMany()
Bulk-save multiple settings at once.
public
saveMany(array<string|int, mixed> $settings[, string|null $scope = null ]) : void
Parameters
- $settings : array<string|int, mixed>
-
Associative array of name => value
- $scope : string|null = null
-
Optional scope applied to all
saveSerialized()
Save a serialized array value as a setting.
public
saveSerialized(string $name, array<string|int, mixed> $value[, string|null $scope = null ]) : void
Parameters
- $name : string
-
Setting name
- $value : array<string|int, mixed>
-
Array to serialize
- $scope : string|null = null
-
Optional scope