Code base synced, updated
[mailer.git] / inc / config / class_FrameworkConfiguration.php
index 6bfdfbf7c1efab379a9cb45a1c0a2bd9e4d0b6ad..8f6fa15f45cd254137a917bb7744bd481a3974f8 100644 (file)
@@ -139,7 +139,7 @@ class FrameworkConfiguration implements Registerable {
                                        // 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
 
@@ -149,63 +149,14 @@ class FrameworkConfiguration implements Registerable {
                } // 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
@@ -232,8 +183,8 @@ class FrameworkConfiguration implements Registerable {
        /**
         * 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
         */