]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/loader/class_ClassLoader.php
Deug backtraces centralized
[shipsimu.git] / inc / loader / class_ClassLoader.php
index 06b8fd82c07e666f9d9e63aecd22e9c2958ed738..5f0f2b97f41cedc1448e08036291ce60536a482b 100644 (file)
@@ -314,11 +314,11 @@ class ClassLoader {
                        // Count this include
                        $this->total++;
 
+                       // Mark this class as loaded
+                       $this->loadedClasses[] = $this->classes[$fileName];
+
                        // Developer mode excludes caching (better debugging)
                        if (!defined('DEVELOPER')) {
-                               // Mark this class as loaded
-                               $this->loadedClasses[] = $this->classes[$fileName];
-
                                // Reset cache
                                $this->classesCached = false;
                        } // END - if
@@ -352,6 +352,22 @@ class ClassLoader {
        public final function getTotal () {
                return $this->total;
        }
+
+       /**
+        * Getter for a printable list of included classes/interfaces/exceptions
+        *
+        * @param       $includeList    A printable include list
+        */
+       public function getPrintableIncludeList () {
+               // Prepare the list
+               $includeList = "";
+               foreach ($this->loadedClasses as $classFile) {
+                       $includeList .= basename($classFile)."<br />\n";
+               } // END - foreach
+
+               // And return it
+               return $includeList;
+       }
 }
 
 // [EOF]