X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fclass_ClassLoader.php;h=eef05549a88553580a4d92e163603a58e7bba084;hb=3ccc1cf129da7478efaf565981dc06e8dd615590;hp=9322c4da0afc470959493f08ec64f3469b4848bb;hpb=4b88c118b615335d06bd74e444173d21aef4406c;p=core.git
diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php
index 9322c4da..eef05549 100644
--- a/inc/loader/class_ClassLoader.php
+++ b/inc/loader/class_ClassLoader.php
@@ -205,7 +205,9 @@ class ClassLoader {
*/
public function __destruct () {
// Skip here if dev-mode
- if (defined('DEVELOPER')) return;
+ if (defined('DEVELOPER')) {
+ return;
+ } // END - if
// Skip here if already cached
if ($this->listCached === false) {
@@ -240,7 +242,7 @@ class ClassLoader {
if ($this->listCached === true) {
// Abort here
return;
- }
+ } // END - if
// Directories which our class loader ignores by default while
// deep-scanning the directory structure.
@@ -274,12 +276,14 @@ class ClassLoader {
// Get filename from iterator
$fileName = $entry->getFileName();
+ // Get the FQFN and add it to our class list
+ $fqfn = $entry->getRealPath();
+
// Is this file wanted?
//* DEBUG: */ echo "FOUND:{$fileName}
\n";
- if ((!in_array($fileName, $this->ignoreList)) && (substr($fileName, 0, strlen($this->prefix)) == $this->prefix) && (substr($fileName, -strlen($this->suffix), strlen($this->suffix)) == $this->suffix)) {
- // Get the FQFN and add it to our class list
- $fqfn = $entry->getRealPath();
+ if ((!in_array($fileName, $this->ignoreList)) && (filesize($fqfn) > 100) && (substr($fileName, 0, strlen($this->prefix)) == $this->prefix) && (substr($fileName, -strlen($this->suffix), strlen($this->suffix)) == $this->suffix)) {
//* DEBUG: */ echo "ADD: {$fileName}
\n";
+ // Add it to the list
$this->classes[$fileName] = $fqfn;
} // END - if
} // END - foreach