class OverrideSettingsRepository implements SettingsRepositoryInterface
A settings repository decorator that allows overriding certain values.
The OverrideSettingsRepository
class decorates another
SettingsRepositoryInterface
instance but allows certain settings to be
overridden with predefined values. It does not affect writing methods.
Within Flarum, this can be used to test out new setting values in a system before they are committed to the database.
Methods
<p>You generally should use the Settings extender's <code>default</code> method instead to register default values.</p>
Details
at
line 28
__construct(SettingsRepositoryInterface $inner, array $overrides)
at
line 34
array
all()
at
line 39
mixed
get(string $key, mixed $default = null)
<p>You generally should use the Settings extender's <code>default</code> method instead to register default values.</p>
<p>You may still need to use the <code>$default</code> parameters here in cases where you need to access the default value of a dynamic setting.</p>