X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Floader%2Fclass_ClassLoader.php;h=f5cc2afd206c40cbce5e3b681059bdd4b1d897d3;hp=ae5eb6fe08c8acf4f896ee09eead5550a74f3a06;hb=5dcdec05cf48f5f940dabab64e3a59e0570ebae3;hpb=768cc231b262ebeaa5aec373d9b7d97cc6b6ac95 diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index ae5eb6fe..f5cc2afd 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, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -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 @@ -72,7 +74,7 @@ class ClassLoader { private $debug = false; /** - * Wether the file list is cached or not + * Whether the file list is cached */ private $listCached = false; @@ -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; }