* in the class loader. See inc/loader/class_ClassLoader.php for instance
*
* @see ClassLoader
- * @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
- *
+ * @link http://www.ship-simu.org
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class FrameworkConfiguration {
- /**
- * Include files which shall be included before the main loader.
- */
- private $moreIncPre = null;
-
- /**
- * Include files which shall be included after the main loader.
- */
- private $moreIncPost = null;
-
+class FrameworkConfiguration implements Registerable {
/**
* The framework's main configuration array which will be initialized with
* hard-coded configuration data and might be overwritten/extended by
const EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND = 0xc01;
/**
- * Private constructor
+ * Protected constructor
*/
- private function __construct () {
- // Initialize both include lists
- $this->moreIncPre = new ArrayObject();
- $this->moreIncPost = new ArrayObject();
+ protected function __construct () {
+ // Empty for now
}
/**
/**
* A private include loader
*
- * @param $arrayObject The array object with all include files
+ * @param $arrayObject The array object with all include files
* @return void
*/
private function loadIncludes (ArrayObject $arrayObject) {
}
}
- /**
- * Load all includes before main loader and clears the array after usage
- *
- * @return void
- */
- public function loadPreIncludes () {
- $this->loadIncludes($this->moreIncPre);
- unset($this->moreIncPre);
- }
-
- /**
- * Load all includes after main loader and clears the array after usage
- *
- * @return void
- */
- public function loadPostIncludes () {
- $this->loadIncludes($this->moreIncPost);
- unset($this->moreIncPost);
- }
-
/**
* Define the database type which must be valid and will not be verified.
*
// Is a valid configuration entry provided?
if (empty($cfgEntry)) {
// Entry is empty
- throw new ConfigEntryIsEmptyException(__CLASS__, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
+ throw new ConfigEntryIsEmptyException($this, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
} elseif (!isset($this->config[$cfgEntry])) {
// Entry was not found!
throw new ConfigEntryNotFoundException(array(__CLASS__, $cfgEntry), self::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
// Is a valid configuration entry provided?
if (empty($cfgEntry)) {
// Entry is empty
- throw new ConfigEntryIsEmptyException(__CLASS__, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
+ throw new ConfigEntryIsEmptyException($this, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
}
// Set the configuration value