X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fclass_ClassLoader.php;h=348a8e039672328820b9a12c785c7890a3890fbd;hb=21ce3472c2e72011ab362292d7e7a83c304f0859;hp=79e9f05ce1d9086fd7b057cc37ea356f493646ef;hpb=389f3abad52f9cde3323db5d3d187562fe801a71;p=hub.git diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index 79e9f05ce..348a8e039 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -280,9 +280,13 @@ class ClassLoader { // Load all classes from the config directory $this->loadClasses($basePath); + // Include these extra configs now + $this->includeExtraConfigs(); + // Set the prefix back $this->prefix = $oldPrefix; $this->prefixLen = strlen($this->prefix); + } /** @@ -312,6 +316,25 @@ class ClassLoader { } // END - if } // END - if } + + /** + * Includes all extra config files + * + * @return void + */ + private function includeExtraConfigs () { + // Run through all class names (should not be much) + foreach ($this->classes as $fileName=>$fqfn) { + // Is this a config? + if (substr($fileName, 0, $this->prefixLen) == $this->prefix) { + // Then include it + require($fqfn); + + // Remove it from the list + unset($this->classes[$fileName]); + } // END - if + } // END - foreach + } } // [EOF]