X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fclass_ClassLoader.php;fp=inc%2Floader%2Fclass_ClassLoader.php;h=fa9c771d9f23912c58b003725cf68f51d0917c5a;hb=b848cab53db89342f0a854a00be91cadbcff2967;hp=4eb1223473c92d6cef605a4bbe942d92d6e43693;hpb=425cd4dda06724de295f7762c27efc2e539c2a53;p=shipsimu.git diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index 4eb1223..fa9c771 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -102,6 +102,11 @@ class ClassLoader { */ private $classCacheFQFN = ""; + /** + * Counter for loaded include files + */ + private $total = 0; + /** * The *public* constructor * @@ -306,6 +311,9 @@ class ClassLoader { // File is found so load it only once require($this->classes[$fileName]); + // Count this include + $this->total++; + // Developer mode excludes caching (better debugging) if (!defined('DEVELOPER')) { // Mark this class as loaded @@ -335,6 +343,15 @@ class ClassLoader { } // END - if } // END - foreach } + + /** + * Getter for total include counter + * + * @return $total Total loaded include files + */ + public final function getTotal () { + return $this->total; + } } // [EOF]