// Is the file name really set?
if (!empty($inc)) {
+ // Base path is by default added
+ $fqfn = $inc;
+
// Base path added? (Uni* / Windows)
if ((substr($inc, 0, 1) != "/") && (substr($inc, 1, 1) != ":")) {
// Generate FQFN
$fqfn = sprintf("%s/inc/extra/%s", PATH, $inc);
- } else {
- // Base path is already added
- $fqfn = $inc;
- }
+ } // END - if
} // END - if
// Include them all here
*/
public function defineDatabaseType ($type) {
// Is it defined or not?
- if (!defined('_DB_TYPE')) {
- // Cast to string
- $type = (string) $type;
-
- // Set the constant
- define('_DB_TYPE', $type);
- } else {
+ 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);
}
/**
ApplicationEntryPoint::app_die(sprintf("[%s:] Invalid path (not found) specified. Please make sure it is created.",
__CLASS__
));
- } elseif (!defined('PATH')) {
- // Set the constant
- define('PATH', $path);
- } else {
+ } 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);
}
/**