mirror of
https://github.com/friendica/friendica
synced 2025-04-22 20:30:11 +00:00
Adding ConfigFileSaver and tests
This commit is contained in:
parent
fa31bb6dde
commit
49def0dc27
21 changed files with 493 additions and 473 deletions
|
@ -6,19 +6,19 @@ use Friendica\Core;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Config\Adapter;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Util\Config\ConfigCacheLoader;
|
||||
use Friendica\Util\Config\ConfigFileLoader;
|
||||
|
||||
class ConfigFactory
|
||||
{
|
||||
/**
|
||||
* @param ConfigCacheLoader $loader The Config Cache loader (INI/config/.htconfig)
|
||||
* @param ConfigFileLoader $loader The Config Cache loader (INI/config/.htconfig)
|
||||
*
|
||||
* @return Cache\ConfigCache
|
||||
*/
|
||||
public static function createCache(ConfigCacheLoader $loader)
|
||||
public static function createCache(ConfigFileLoader $loader)
|
||||
{
|
||||
$configCache = new Cache\ConfigCache();
|
||||
$loader->loadConfigFiles($configCache);
|
||||
$loader->setupCache($configCache);
|
||||
|
||||
return $configCache;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class DependencyFactory
|
|||
{
|
||||
$basePath = BasePath::create($directory, $_SERVER);
|
||||
$mode = new App\Mode($basePath);
|
||||
$configLoader = new Config\ConfigCacheLoader($basePath, $mode);
|
||||
$configLoader = new Config\ConfigFileLoader($basePath, $mode);
|
||||
$configCache = Factory\ConfigFactory::createCache($configLoader);
|
||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||
Factory\DBFactory::init($basePath, $configCache, $profiler, $_SERVER);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue