mirror of
https://github.com/friendica/friendica
synced 2025-04-22 08:30:10 +00:00
Some improvements
- Move $_SERVER into ConfigFileManager constructor - Rename "creatConfigFileLoader" to "createConfigFileManager" - Rename variable "loader" to "manager" in all tests
This commit is contained in:
parent
b4096251ba
commit
cdd57275eb
12 changed files with 134 additions and 125 deletions
|
@ -39,19 +39,14 @@ class Config implements IManageConfigValues
|
|||
/** @var ConfigFileManager */
|
||||
protected $configFileManager;
|
||||
|
||||
/** @var array */
|
||||
protected $server;
|
||||
|
||||
/**
|
||||
* @param ConfigFileManager $configFileManager The configuration file manager to save back configs
|
||||
* @param Cache $configCache The configuration cache (based on the config-files)
|
||||
* @param array $server The $_SERVER variable
|
||||
*/
|
||||
public function __construct(ConfigFileManager $configFileManager, Cache $configCache, array $server = [])
|
||||
public function __construct(ConfigFileManager $configFileManager, Cache $configCache)
|
||||
{
|
||||
$this->configFileManager = $configFileManager;
|
||||
$this->configCache = $configCache;
|
||||
$this->server = $server;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,7 +82,7 @@ class Config implements IManageConfigValues
|
|||
$configCache = new Cache();
|
||||
|
||||
try {
|
||||
$this->configFileManager->setupCache($configCache, $this->server);
|
||||
$this->configFileManager->setupCache($configCache);
|
||||
} catch (ConfigFileException $e) {
|
||||
throw new ConfigPersistenceException('Cannot reload config', $e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue