]> git.mxchange.org Git - core.git/blobdiff - framework/config/class_FrameworkConfiguration.php
Continued:
[core.git] / framework / config / class_FrameworkConfiguration.php
index 2984c376ee83d6dc7fac1397f62ca283211b15d0..e43a3b86eb773f80f96050d71df88d0d52fe6a3b 100644 (file)
@@ -41,24 +41,23 @@ use \InvalidArgumentException;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class FrameworkConfiguration implements Registerable {
+       // Some constants for the configuration system
+       const EXCEPTION_CONFIG_KEY_IS_EMPTY = 0x130;
+       const EXCEPTION_CONFIG_KEY_WAS_NOT_FOUND = 0x131;
+       const EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED = 0x132;
 
        /**
         * The framework's main configuration array which will be initialized with
         * hard-coded configuration data and might be overwritten/extended by
         * config data from the database.
         */
-       private static $config = [];
+       private static $configData = [];
 
        /**
         * Call-back instance (unused)
         */
        private $callbackInstance = NULL;
 
-       // Some constants for the configuration system
-       const EXCEPTION_CONFIG_KEY_IS_EMPTY = 0x130;
-       const EXCEPTION_CONFIG_KEY_WAS_NOT_FOUND = 0x131;
-       const EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED = 0x132;
-
        /**
         * Default constructor, the configuration entries are static, not the
         * whole instance.
@@ -93,7 +92,7 @@ class FrameworkConfiguration implements Registerable {
                }
 
                // Is it set?
-               $isset = ((isset(self::$config[$configKey])) || (array_key_exists($configKey, self::$config)));
+               $isset = ((isset(self::$configData[$configKey])) || (array_key_exists($configKey, self::$configData)));
 
                // Return the result
                return $isset;
@@ -124,7 +123,7 @@ class FrameworkConfiguration implements Registerable {
                }
 
                // Return the requested value
-               return self::$config[$configKey];
+               return self::$configData[$configKey];
        }
 
        /**
@@ -151,10 +150,10 @@ class FrameworkConfiguration implements Registerable {
 
                // Set the configuration value
                //* NOISY-DEBUG: */ print(__METHOD__ . ':configEntry=' . $configKey . ',configValue[' . gettype($configValue) . ']=' . $configValue . PHP_EOL);
-               self::$config[$configKey] = $configValue;
+               self::$configData[$configKey] = $configValue;
 
                // Resort the array
-               ksort(self::$config);
+               ksort(self::$configData);
        }
 
        /**
@@ -164,7 +163,7 @@ class FrameworkConfiguration implements Registerable {
         */
        public final function getConfigurationArray () {
                // Return it
-               return self::$config;
+               return self::$configData;
        }
 
        /**
@@ -193,7 +192,7 @@ class FrameworkConfiguration implements Registerable {
                }
 
                // Unset it
-               unset(self::$config[$configKey]);
+               unset(self::$configData[$configKey]);
        }
 
        /**