* hard-coded configuration data and might be overwritten/extended by
* config data from the database.
*/
- private $config = array();
-
- /**
- * The configuration instance itself
- */
- private static $configInstance = NULL;
+ private static $config = array();
/**
* Call-back instance (unused)
const EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED = 0x132;
/**
- * Private constructor
+ * Default constructor, the configuration entries are static, not the
+ * whole instance.
*
* @return void
*/
- private function __construct () {
+ public function __construct () {
// Empty for now
}
return get_class($this);
}
- /**
- * Getter for a singleton instance of this class
- *
- * @return $configInstance A singleton instance of this class
- */
- public static final function getSelfInstance () {
- // is the instance there?
- if (is_null(self::$configInstance)) {
- // Create a config instance
- self::$configInstance = new FrameworkConfiguration();
- } // END - if
-
- // Return singleton instance
- return self::$configInstance;
- }
-
/**
* Checks whether the given configuration key is set
*
}
// Is it set?
- $isset = ((isset($this->config[$configKey])) || (array_key_exists($configKey, $this->config)));
+ $isset = ((isset(self::$config[$configKey])) || (array_key_exists($configKey, self::$config)));
// Return the result
return $isset;
} // END - if
// Return the requested value
- return $this->config[$configKey];
+ return self::$config[$configKey];
}
/**
// Set the configuration value
//* NOISY-DEBUG: */ print(__METHOD__ . ':configEntry=' . $configKey . ',configValue[' . gettype($configValue) . ']=' . $configValue . PHP_EOL);
- $this->config[$configKey] = $configValue;
+ self::$config[$configKey] = $configValue;
// Resort the array
- ksort($this->config);
+ ksort(self::$config);
}
/**
*/
public final function getConfigurationArray () {
// Return it
- return $this->config;
+ return self::$config;
}
/**
} // END - if
// Unset it
- unset($this->config[$configKey]);
+ unset(self::$config[$configKey]);
}
/**