]> git.mxchange.org Git - friendica.git/blobdiff - src/Factory/ConfigFactory.php
bugfixing ini-loading
[friendica.git] / src / Factory / ConfigFactory.php
index 1b0b66eec3cd53ce6ae4a71210af2faf17e53b7c..269daea8b8d5514d6a19497a912dc43d54c50506 100644 (file)
@@ -6,6 +6,11 @@ use Friendica\Core\Config;
 
 class ConfigFactory
 {
+       /**
+        * @param Config\ConfigCacheLoader $loader The Config Cache loader (INI/config/.htconfig)
+        *
+        * @return Config\ConfigCache
+        */
        public static function createCache(Config\ConfigCacheLoader $loader)
        {
                $configCache = new Config\ConfigCache();
@@ -17,9 +22,10 @@ class ConfigFactory
        /**
         * @param string              $type   The adapter type
         * @param Config\IConfigCache $config The config cache of this adapter
+        *
         * @return Config\IConfigAdapter
         */
-       public static function createConfig($type, $config)
+       public static function createConfig($type, Config\IConfigCache $config)
        {
                if ($type == 'preload') {
                        return new Config\PreloadConfigAdapter($config);
@@ -30,14 +36,15 @@ class ConfigFactory
 
        /**
         * @param string               $type   The adapter type
-        * @param int                  $uid    The UID of the current user
         * @param Config\IPConfigCache $config The config cache of this adapter
+        * @param int                  $uid    The UID of the current user
+        *
         * @return Config\IPConfigAdapter
         */
-       public static function createPConfig($type, $uid, $config)
+       public static function createPConfig($type, Config\IPConfigCache $config, $uid = null)
        {
                if ($type == 'preload') {
-                       return new Config\PreloadPConfigAdapter($uid, $config);
+                       return new Config\PreloadPConfigAdapter($config, $uid);
                } else {
                        return new Config\JITPConfigAdapter($config);
                }