]> git.mxchange.org Git - friendica.git/commitdiff
Updating type-hints and some naming conventions
authorPhilipp Holzer <admin@philipp.info>
Mon, 4 Feb 2019 08:32:13 +0000 (09:32 +0100)
committerPhilipp Holzer <admin@philipp.info>
Mon, 4 Feb 2019 08:32:13 +0000 (09:32 +0100)
src/Core/Config.php
src/Core/PConfig.php

index 3eace0fbc18c71a270bd6247c2a830f99208018c..81282d4df2e905c611d3612b015e4fd8b206faa5 100644 (file)
@@ -25,16 +25,16 @@ class Config
        /**
         * @var Config\IConfigCache
         */
-       private static $config;
+       private static $cache;
 
        /**
         * Initialize the config with only the cache
         *
-        * @param Config\IConfigCache $config  The configuration cache
+        * @param Config\IConfigCache $cache  The configuration cache
         */
-       public static function init(Config\IConfigCache $config)
+       public static function init(Config\IConfigCache $cache)
        {
-               self::$config  = $config;
+               self::$cache  = $cache;
        }
 
        /**
@@ -88,7 +88,7 @@ class Config
        public static function get($family, $key, $default_value = null, $refresh = false)
        {
                if (!isset(self::$adapter)) {
-                       return self::$config->get($family, $key, $default_value);
+                       return self::$cache->get($family, $key, $default_value);
                }
 
                return self::$adapter->get($family, $key, $default_value, $refresh);
@@ -111,7 +111,7 @@ class Config
        public static function set($family, $key, $value)
        {
                if (!isset(self::$adapter)) {
-                       self::$config->set($family, $key, $value);
+                       self::$cache->set($family, $key, $value);
                        return true;
                }
 
@@ -132,7 +132,7 @@ class Config
        public static function delete($family, $key)
        {
                if (!isset(self::$adapter)) {
-                       self::$config->delete($family, $key);
+                       self::$cache->delete($family, $key);
                }
 
                return self::$adapter->delete($family, $key);
index 8782a20d234239a048cff2ddfb078276704002e8..908f0bf3ddf941558ceb57998fae4627e1a72c04 100644 (file)
@@ -25,16 +25,16 @@ class PConfig
        /**
         * @var Config\IPConfigCache
         */
-       private static $config;
+       private static $cache;
 
        /**
         * Initialize the config with only the cache
         *
-        * @param Config\IPConfigCache $config  The configuration cache
+        * @param Config\IPConfigCache $cache  The configuration cache
         */
-       public static function init($config)
+       public static function init(Config\IPConfigCache $cache)
        {
-               self::$config  = $config;
+               self::$cache  = $cache;
        }
 
        /**
@@ -42,7 +42,7 @@ class PConfig
         *
         * @param Config\IPConfigAdapter $adapter
         */
-       public static function setAdapter($adapter)
+       public static function setAdapter(Config\IPConfigAdapter $adapter)
        {
                self::$adapter = $adapter;
        }
@@ -85,7 +85,7 @@ class PConfig
        public static function get($uid, $family, $key, $default_value = null, $refresh = false)
        {
                if (!isset(self::$adapter)) {
-                       return self::$config->getP($uid, $family, $key, $default_value);
+                       return self::$cache->getP($uid, $family, $key, $default_value);
                }
 
                return self::$adapter->get($uid, $family, $key, $default_value, $refresh);
@@ -109,7 +109,7 @@ class PConfig
        public static function set($uid, $family, $key, $value)
        {
                if (!isset(self::$adapter)) {
-                       return self::$config->setP($uid, $family, $key, $value);
+                       return self::$cache->setP($uid, $family, $key, $value);
                }
 
                return self::$adapter->set($uid, $family, $key, $value);
@@ -130,7 +130,7 @@ class PConfig
        public static function delete($uid, $family, $key)
        {
                if (!isset(self::$adapter)) {
-                       return self::$config->deleteP($uid, $family, $key);
+                       return self::$cache->deleteP($uid, $family, $key);
                }
 
                return self::$adapter->delete($uid, $family, $key);