X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Floader%2Fclass_ClassLoader.php;h=61d5effc16031fc2b688a26fbb6e7a2d79573e66;hp=ae5eb6fe08c8acf4f896ee09eead5550a74f3a06;hb=87f159865b77c22625924b2563b0f1f953c09dd1;hpb=d90e5850767bfef7a3307df1bca5cbaee21cbe64 diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index ae5eb6fe..61d5effc 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -22,6 +22,8 @@ * along with this program. If not, see . * * ---------------------------------- + * 1.4 + * - Some comments improved, other minor improvements * 1.3 * - Constructor is now empty and factory method 'createClassLoader' is created * - renamed loadClasses to scanClassPath @@ -139,9 +141,9 @@ class ClassLoader { } /** - * Our renamed factory method + * Creates an instance of this class loader for given configuration instance * - * @param $configInstance Configuration class instance + * @param $configInstance Configuration class instance * @return void */ public static final function createClassLoader (FrameworkConfiguration $configInstance) { @@ -219,7 +221,7 @@ class ClassLoader { /** * Singleton getter for an instance of this class * - * @return $selfInstance A singleton instance of this class + * @return $selfInstance A singleton instance of this class */ public static final function getSelfInstance () { // Is the instance there? @@ -246,8 +248,11 @@ class ClassLoader { return; } // END - if - // Directories which our class loader ignores by default while - // deep-scanning the directory structure. + /* + * Directories which this class loader ignores by default while + * scanning the whole directory structure starting from given base + * path. + */ $ignoreList[] = '.'; $ignoreList[] = '..'; $ignoreList[] = '.htaccess'; @@ -256,9 +261,11 @@ class ClassLoader { // Keep it in class for later usage $this->ignoreList = $ignoreList; - // Set base directory which holds all our classes, we should use an - // absolute path here so is_dir(), is_file() and so on will always - // find the correct files and dirs. + /* + * Set base directory which holds all our classes, we should use an + * absolute path here so is_dir(), is_file() and so on will always + * find the correct files and dirs. + */ $basePath2 = realpath($basePath); // If the basePath is false it is invalid @@ -312,7 +319,7 @@ class ClassLoader { // Include these extra configs now $this->includeExtraConfigs(); - // Set the prefix back + // Set back the old prefix $this->prefix = $oldPrefix; }