3 namespace Friendica\Factory;
5 use Friendica\Core\Config;
9 public static function createCache(Config\ConfigCacheLoader $loader)
11 $configCache = new Config\ConfigCache();
12 $loader->loadConfigFiles($configCache);
18 * @param string $type The adapter type
19 * @param Config\IConfigCache $config The config cache of this adapter
20 * @return Config\IConfigAdapter
22 public static function createConfig($type, $config)
24 if ($type == 'preload') {
25 return new Config\PreloadConfigAdapter($config);
27 return new Config\JITConfigAdapter($config);
32 * @param string $type The adapter type
33 * @param int $uid The UID of the current user
34 * @param Config\IPConfigCache $config The config cache of this adapter
35 * @return Config\IPConfigAdapter
37 public static function createPConfig($type, $uid, $config)
39 if ($type == 'preload') {
40 return new Config\PreloadPConfigAdapter($uid, $config);
42 return new Config\JITPConfigAdapter($config);