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.

Properties

protected $inner
protected $overrides

Methods

__construct(SettingsRepositoryInterface $inner, array $overrides)

No description

all()

No description

get($key, $default = null)

No description

set($key, $value)

No description

delete($key)

No description

Details

__construct(SettingsRepositoryInterface $inner, array $overrides)

Parameters

SettingsRepositoryInterface $inner
array $overrides

all()

get($key, $default = null)

Parameters

$key
$default

set($key, $value)

Parameters

$key
$value

delete($key)

Parameters

$key