]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config.php
Remove unused killme()
[friendica.git] / src / Core / Config.php
index 4bf9c5b11d2d4aa96495516edfc38dc94c098f25..6864cb78d6004b264b240406ae7e1bd40ba98c34 100644 (file)
@@ -8,6 +8,8 @@
  */
 namespace Friendica\Core;
 
+use Friendica\DI;
+
 /**
  * @brief Arbitrary system configuration storage
  *
@@ -17,21 +19,6 @@ namespace Friendica\Core;
  */
 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.
         *
@@ -41,7 +28,7 @@ class Config
         */
        public static function load($cat = "config")
        {
-               self::$config->load($cat);
+               DI::config()->load($cat);
        }
 
        /**
@@ -57,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);
        }
 
        /**
@@ -75,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);
        }
 
        /**
@@ -88,6 +75,6 @@ class Config
         */
        public static function delete($cat, $key)
        {
-               return self::$config->delete($cat, $key);
+               return DI::config()->delete($cat, $key);
        }
 }