SettingStore
abstract class SettingStore
Properties
protected array | $items | The settings items. |
|
protected bool | $unsaved | Whether the store has changed since it was last loaded. |
|
protected bool | $loaded | Whether the settings data are loaded. |
Methods
Get a specific key from the settings data.
Determine if a key exists in the settings data.
Set a specific key to a value in the settings data.
Unset a key in the settings data.
Unset all keys in the settings data.
Get all settings data.
Save any changes done to the settings data.
Make sure data is loaded.
Read the data from the store.
Write the data into the store.
Details
at line 35
mixed
get(string|array $key, mixed $default = null)
Get a specific key from the settings data.
at line 49
bool
has(string $key)
Determine if a key exists in the settings data.
at line 62
set(string|array $key, mixed $value = null)
Set a specific key to a value in the settings data.
at line 84
forget(string $key)
Unset a key in the settings data.
at line 97
void
forgetAll()
Unset all keys in the settings data.
at line 107
array
all()
Get all settings data.
at line 118
void
save()
Save any changes done to the settings data.
at line 135
load(bool $force = false)
Make sure data is loaded.
at line 147
abstract protected array
read()
Read the data from the store.
at line 156
abstract protected void
write(array $data)
Write the data into the store.