// Base path added? (Uni* / Windows)
if ((substr($inc, 0, 1) != "/") && (substr($inc, 1, 1) != ":")) {
// Generate FQFN
- $fqfn = sprintf("%s/inc/extra/%s", PATH, $inc);
+ $fqfn = sprintf("%s/inc/extra/%s", $this->readConfig('base_path'), $inc);
} // END - if
} // END - if
} // END - if
}
- /**
- * Define the database type which must be valid and will not be verified.
- *
- * @param $type The database type. See path inc/database/.
- * @return void
- */
- public function defineDatabaseType ($type) {
- // Is it defined or not?
- if (defined('_DB_TYPE')) {
- // Already defined! But we cannot throw an exception here... :(
- ApplicationEntryPoint::app_die(sprintf("[%s:] Please define the database type only once in your application!",
- __CLASS__
- ));
- }
-
- // Set the constant
- define('_DB_TYPE', (string) $type);
- }
-
- /**
- * Define the local file path
- *
- * @param $path Local file path for include files.
- * @return void
- */
- public function definePath ($path) {
- // Cast to string
- $path = (string) $path;
-
- // Replace backslashes with slashes
- $path = str_replace("\\", "/", $path);
-
- // Is it defined or not?
- if ((!is_dir($path)) || (!is_readable($path))) {
- // Is not a valid path
- ApplicationEntryPoint::app_die(sprintf("[%s:] Invalid path (not found) specified. Please make sure it is created.",
- __CLASS__
- ));
- } elseif (defined('PATH')) {
- // Already defined! But we cannot throw an exception here... :(
- ApplicationEntryPoint::app_die(sprintf("[%s:] Please define the local file path only once in your application.",
- __CLASS__
- ));
- }
-
- // Define path here
- define('PATH', $path);
- }
-
/**
* Read a configuration element.
*
- * @param $cfgEntry The configuration element
+ * @param $cfgEntry The configuration element
* @return $cfgValue The fetched configuration value
- * @throws ConfigEntryIsEmptyException If $cfgEntry is empty
+ * @throws ConfigEntryIsEmptyException If $cfgEntry is empty
* @throws ConfigEntryNotFoundException If a configuration element
- * was not found
+ * was not found
*/
public function readConfig ($cfgEntry) {
// Cast to string
/**
* Set a configuration entry.
*
- * @param $cfgEntry The configuration entry we want to add/change
- * @param $cfgValue The configuration value we want to set
+ * @param $cfgEntry The configuration entry we want to add/change
+ * @param $cfgValue The configuration value we want to set
* @return void
* @throws ConfigEntryIsEmptyException If $cfgEntry is empty
*/