* @see ClassLoader
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
private static $cfgInstance = null;
// Some constants for the configuration system
- const EXCEPTION_CONFIG_ENTRY_IS_EMPTY = 0xc00;
- const EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND = 0xc01;
+ const EXCEPTION_CONFIG_ENTRY_IS_EMPTY = 0x130;
+ const EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND = 0x131;
/**
* Protected constructor
+ *
+ * @return void
*/
protected function __construct () {
// Empty for now
/**
* "Create" a configuration instance
+ *
+ * @param $enableDebug Wether enable debug mode (default: off)
+ * @return $cfgInstance An instance of this configuration class
*/
public final static function createFrameworkConfiguration ($enableDebug = false) {
/**
* through the initial configuration.
*/
if (is_null(self::$cfgInstance)) {
- // CFG: DEBUG-LEVEL
+ // CFG: ERROR-REPORTING
@error_reporting(E_ALL | E_STRICT);
/**
// At least 5.1.0 is required for this!
if (version_compare(phpversion(), "5.1.0")) {
@date_default_timezone_set($zone);
- }
+ } // END - if
}
/**
// Base path is already added
$fqfn = $inc;
}
- }
+ } // END - if
// Include them all here
require($fqfn);
}
- }
+ } // END - if
}
/**
// Debug message
if ((defined('DEBUG_CONFIG')) || (defined('DEBUG_ALL'))) {
echo "[".__METHOD__."] Configuration entry ".$cfgEntry." requested.<br />\n";
- }
+ } // END - if
// Return the requested value
return $this->config[$cfgEntry];
if (empty($cfgEntry)) {
// Entry is empty
throw new ConfigEntryIsEmptyException($this, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
- }
+ } // END - if
// Set the configuration value
$this->config[$cfgEntry] = $cfgValue;