class Configuration
{
/**
- * The blacklist of configuration settings, which should not get saved to the backend
- * @var array
- */
- private $configSaveBlacklist = [
- 'config' => [
- 'hostname' => true,
- ]
- ];
-
- /**
- * @var Cache\IConfigCache
+ * @var Cache\ConfigCache
*/
private $configCache;
private $configAdapter;
/**
- * @param Cache\IConfigCache $configCache The configuration cache (based on the config-files)
+ * @param Cache\ConfigCache $configCache The configuration cache (based on the config-files)
* @param Adapter\IConfigAdapter $configAdapter The configuration DB-backend
*/
- public function __construct(Cache\IConfigCache $configCache, Adapter\IConfigAdapter $configAdapter)
+ public function __construct(Cache\ConfigCache $configCache, Adapter\IConfigAdapter $configAdapter)
{
$this->configCache = $configCache;
$this->configAdapter = $configAdapter;
/**
* Returns the Config Cache
*
- * @return Cache\IConfigCache
+ * @return Cache\ConfigCache
*/
public function getCache()
{
if (isset($dbvalue)) {
$this->configCache->set($cat, $key, $dbvalue);
- return $dbvalue;
+ unset($dbvalue);
}
}
$cached = $this->configCache->set($cat, $key, $value);
// If there is no connected adapter, we're finished
- if (!$this->configAdapter->isConnected() && !empty($this->configSaveBlacklist[$cat][$key])) {
+ if (!$this->configAdapter->isConnected()) {
return $cached;
}