X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Floader%2Fclass_ClassLoader.php;h=134b8c10d4af9d7a533065d105da41c4f92c09c6;hb=8ff12f905898b0c2b7ff8124c9749ad6fb9c44f3;hp=c7dc2d755de71ba29f30585b3aaa9f70f6baef34;hpb=8ff2f773e29b6628131d73271f5cac9b2756374e;p=shipsimu.git diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index c7dc2d7..134b8c1 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -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('local_db_path') . "list-" . $this->cfgInstance->readConfig('app_name') . ".cache"; + $this->classCacheFQFN = $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); @@ -334,7 +334,7 @@ class ClassLoader { */ private function includeExtraConfigs () { // Run through all class names (should not be much) - foreach ($this->classes as $fileName=>$fqfn) { + foreach ($this->classes as $fileName => $fqfn) { // Is this a config? if (substr($fileName, 0, $this->prefixLen) == $this->prefix) { // Then include it