]> git.mxchange.org Git - friendica.git/blob - src/Core/BasePConfig.php
Merge pull request #8227 from annando/daemon-checks
[friendica.git] / src / Core / BasePConfig.php
1 <?php
2
3 namespace Friendica\Core;
4
5 use Friendica\Core\PConfig\Cache;
6 use Friendica\Core\PConfig\IPConfig;
7 use Friendica\Model;
8
9 /**
10  * This class is responsible for the user-specific configuration values in Friendica
11  * The values are set through the Config-DB-Table (per Config-DB-model @see Model\Config\PConfig)
12  *
13  * The configuration cache (@see Cache\PConfigCache) is used for temporary caching of database calls. This will
14  * increase the performance.
15  */
16 abstract class BasePConfig implements IPConfig
17 {
18         /**
19          * @var Cache
20          */
21         protected $configCache;
22
23         /**
24          * @var Model\Config\PConfig
25          */
26         protected $configModel;
27
28         /**
29          * @param Cache $configCache The configuration cache
30          * @param Model\Config\PConfig          $configModel The configuration model
31          */
32         public function __construct(Cache $configCache, Model\Config\PConfig $configModel)
33         {
34                 $this->configCache = $configCache;
35                 $this->configModel = $configModel;
36         }
37
38         /**
39          * Returns the Config Cache
40          *
41          * @return Cache
42          */
43         public function getCache()
44         {
45                 return $this->configCache;
46         }
47 }