Constants PATH and _DB_TYPE replaced
[shipsimu.git] / inc / loader / class_ClassLoader.php
index 7297c7d199355193949bb933514ff1e88c3d7fff..5f5f97a3446db380af0842e9665b685e06cbb222 100644 (file)
@@ -119,8 +119,8 @@ class ClassLoader {
 
                // Construct the FQFN for the cache
                if (!defined('DEVELOPER')) {
-                       $this->listCacheFQFN  = PATH . $this->cfgInstance->readConfig('local_db_path') . "list-" . $this->cfgInstance->readConfig('app_name') . ".cache";
-                       $this->classCacheFQFN = PATH . $this->cfgInstance->readConfig('local_db_path') . "class-" . $this->cfgInstance->readConfig('app_name') . ".cache";
+                       $this->listCacheFQFN  = $this->cfgInstance->readConfig('base_path') . $this->cfgInstance->readConfig('local_db_path') . "list-" . $this->cfgInstance->readConfig('app_name') . ".cache";
+                       $this->classCacheFQFN = $this->cfgInstance->readConfig('base_path') . $this->cfgInstance->readConfig('local_db_path') . "class-" . $this->cfgInstance->readConfig('app_name') . ".cache";
                } // END - if
 
                // Set suffix and prefix from configuration
@@ -208,8 +208,8 @@ class ClassLoader {
        /**
         * Scans recursively a local path for class files which must have a prefix and a suffix as given by $this->suffix and $this->prefix
         *
-        * @param               $basePath               The relative base path to PATH constant for all classes
-        * @param               $ignoreList     An optional list (array or string) of directory names which shall be ignored
+        * @param       $basePath               The relative base path to 'base_path' constant for all classes
+        * @param       $ignoreList             An optional list (array or string) of directory names which shall be ignored
         * @return      void
         */
        public function loadClasses ($basePath, $ignoreList = array() ) {
@@ -280,7 +280,7 @@ class ClassLoader {
                $this->prefixLen = strlen($this->prefix);
 
                // Set base directory
-               $basePath = sprintf("%sinc/config/", PATH);
+               $basePath = sprintf("%sinc/config/", $this->cfgInstance->readConfig('base_path'));
 
                // Load all classes from the config directory
                $this->loadClasses($basePath);