]> git.mxchange.org Git - core.git/blobdiff - framework/loader/class_ClassLoader.php
Continued:
[core.git] / framework / loader / class_ClassLoader.php
index 8ce8488a5f2b12ef4c88b28fc571e924b61ad5b1..b19d5dc5ce3ef33882ea71d576f46d2b37da5c65 100644 (file)
@@ -441,8 +441,8 @@ final class ClassLoader {
                        return;
                }
 
-               // Keep it in class for later usage
-               $this->ignoreList = $ignoreList;
+               // Keep it in class for later usage, but flip index<->value
+               $this->ignoreList = array_flip($ignoreList);
 
                /*
                 * Set base directory which holds all our classes, an absolute path
@@ -474,7 +474,7 @@ final class ClassLoader {
                        $fileName = $currentEntry->getFilename();
 
                        // Current entry must be a file, not smaller than 100 bytes and not on ignore list
-                       if ((!$currentEntry->isFile()) || (in_array($fileName, $this->ignoreList)) || ($currentEntry->getSize() < 100)) {
+                       if (!$currentEntry->isFile() || isset($this->ignoreList[$fileName]) || $currentEntry->getSize() < 100) {
                                // Advance to next entry
                                $iteratorInstance->next();