mirror of
https://github.com/flarum/framework.git
synced 2025-05-11 06:36:16 +08:00

Depending on the state of the Flarum installation (installed, not installed, currently upgrading, maintenance mode), we should enable different sets of service providers. For example, during installation we should not resolve a setting repository from the container. This new architecture lets us do so, but we can easily (and cleanly) register a different implementation during installation. This should prevent problems such as #1370 in the future.
36 lines
617 B
PHP
36 lines
617 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* (c) Toby Zerner <toby.zerner@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\Settings;
|
|
|
|
class UninstalledSettingsRepository implements SettingsRepositoryInterface
|
|
{
|
|
public function all()
|
|
{
|
|
return [];
|
|
}
|
|
|
|
public function get($key, $default = null)
|
|
{
|
|
return $default;
|
|
}
|
|
|
|
public function set($key, $value)
|
|
{
|
|
// Do nothing
|
|
}
|
|
|
|
public function delete($keyLike)
|
|
{
|
|
// Do nothing
|
|
}
|
|
}
|