]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config.php
Remove unused killme()
[friendica.git] / src / Core / Config.php
index 405d14d126e6749426407a93fb4f1af65da723ca..6864cb78d6004b264b240406ae7e1bd40ba98c34 100644 (file)
@@ -8,9 +8,7 @@
  */
 namespace Friendica\Core;
 
-use Friendica\Core\Config\ConfigCache;
-use Friendica\Core\Config\IConfigAdapter;
-use Friendica\Core\Config\IConfigCache;
+use Friendica\DI;
 
 /**
  * @brief Arbitrary system configuration storage
@@ -21,21 +19,6 @@ use Friendica\Core\Config\IConfigCache;
  */
 class Config
 {
-       /**
-        * @var Config\Configuration
-        */
-       private static $config;
-
-       /**
-        * Initialize the config
-        *
-        * @param Config\Configuration $config
-        */
-       public static function init(Config\Configuration $config)
-       {
-               self::$config = $config;
-       }
-
        /**
         * @brief Loads all configuration values of family into a cached storage.
         *
@@ -45,7 +28,7 @@ class Config
         */
        public static function load($cat = "config")
        {
-               self::$config->load($cat);
+               DI::config()->load($cat);
        }
 
        /**
@@ -61,7 +44,7 @@ class Config
         */
        public static function get($cat, $key, $default_value = null, $refresh = false)
        {
-               return self::$config->get($cat, $key, $default_value, $refresh);
+               return DI::config()->get($cat, $key, $default_value, $refresh);
        }
 
        /**
@@ -79,7 +62,7 @@ class Config
         */
        public static function set($cat, $key, $value)
        {
-               return self::$config->set($cat, $key, $value);
+               return DI::config()->set($cat, $key, $value);
        }
 
        /**
@@ -92,6 +75,6 @@ class Config
         */
        public static function delete($cat, $key)
        {
-               return self::$config->delete($cat, $key);
+               return DI::config()->delete($cat, $key);
        }
 }