AppSettingsService
class AppSettingsService (View source)
Layered reader for admin-managed settings.
Resolution order (first non-null wins):
- app_settings row for the dotted key (admin-managed via UI - none yet)
- ConfigurationManager for the same key, split on the first "." into (group, key) so "interface.theme" -> get('interface', 'theme')
- Caller-supplied default
Writes go straight to the repository. The service memoizes reads within a single request to avoid repeating identical lookups.
Constants
| TYPE_STRING |
|
| TYPE_INT |
|
| TYPE_BOOL |
|
| TYPE_JSON |
|
Methods
string
getString(string $key, string $default = '')
No description
int
getInt(string $key, int $default = 0)
No description
bool
getBool(string $key, bool $default = false)
No description
array
getArray(string $key, array $default = [])
No description
void
setString(string $key, string $value)
No description
void
setInt(string $key, int $value)
No description
void
setBool(string $key, bool $value)
No description
void
setArray(string $key, array $value)
No description
void
clear(string $key)
No description
Details
__construct(ConfigurationManager $config, AppSettingRepositoryInterface $repository)
No description
string
getString(string $key, string $default = '')
No description
int
getInt(string $key, int $default = 0)
No description
bool
getBool(string $key, bool $default = false)
No description
array
getArray(string $key, array $default = [])
No description
void
setString(string $key, string $value)
No description
void
setInt(string $key, int $value)
No description
void
setBool(string $key, bool $value)
No description
void
setArray(string $key, array $value)
No description
void
clear(string $key)
No description