friendica/src/Core/BaseConfig.php

45 lines
1,014 B
PHP
Raw Normal View History

<?php
namespace Friendica\Core;
use Friendica\Core\Config\Cache;
use Friendica\Core\Config\IConfig;
use Friendica\Model;
/**
* This class is responsible for all system-wide configuration values in Friendica
* There are two types of storage
* - The Config-Files (loaded into the FileCache @see Cache\ConfigCache)
* - The Config-DB-Table (per Config-DB-model @see Model\Config\Config)
*/
abstract class BaseConfig implements IConfig
{
/**
* @var Cache\ConfigCache
*/
protected $configCache;
/**
* @var Model\Config\Config
*/
protected $configModel;
/**
* @param Cache\ConfigCache $configCache The configuration cache (based on the config-files)
* @param Model\Config\Config $configModel The configuration model
*/
public function __construct(Cache\ConfigCache $configCache, Model\Config\Config $configModel)
{
$this->configCache = $configCache;
$this->configModel = $configModel;
}
/**
* {@inheritDoc}
*/
public function getCache()
{
return $this->configCache;
}
}