]> git.mxchange.org Git - friendica.git/blob - src/Core/BaseConfig.php
Merge pull request #8222 from annando/ap-gnusocial
[friendica.git] / src / Core / BaseConfig.php
1 <?php
2
3 namespace Friendica\Core;
4
5 use Friendica\Core\Config\Cache;
6 use Friendica\Core\Config\IConfig;
7 use Friendica\Model;
8
9 /**
10  * This class is responsible for all system-wide configuration values in Friendica
11  * There are two types of storage
12  * - The Config-Files    (loaded into the FileCache @see Cache\ConfigCache)
13  * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config)
14  */
15 abstract class BaseConfig implements IConfig
16 {
17         /**
18          * @var Cache
19          */
20         protected $configCache;
21
22         /**
23          * @var Model\Config\Config
24          */
25         protected $configModel;
26
27         /**
28          * @param Cache $configCache The configuration cache (based on the config-files)
29          * @param Model\Config\Config          $configModel The configuration model
30          */
31         public function __construct(Cache $configCache, Model\Config\Config $configModel)
32         {
33                 $this->configCache = $configCache;
34                 $this->configModel = $configModel;
35         }
36
37         /**
38          * {@inheritDoc}
39          */
40         public function getCache()
41         {
42                 return $this->configCache;
43         }
44 }