1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 03:14:33 +02:00

Split up Site into several classes

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.
This commit is contained in:
Franz Liedke
2018-04-16 01:31:00 +02:00
parent 7a6e208554
commit 5b821b21b1
10 changed files with 683 additions and 441 deletions

View File

@@ -0,0 +1,35 @@
<?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
}
}