2 /////// Load framework classes first ////////
5 * Lower framework classes
8 0 => "exceptions", // Exceptions
9 1 => "interfaces", // Interfaces
10 2 => "main", // General main classes
11 3 => "middleware" // The middleware
15 foreach ($lowerClasses as $class) {
16 // Try to load the framework classes
18 ClassLoader::getInstance()->loadClasses(sprintf("inc/classes/%s/", $class));
19 } catch (PathIsNoDirectoryException $e) {
20 ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad <strong>%s</strong> nicht laden. Reason: <strong>%s</strong>",
23 } catch (PathIsEmptyException $e) {
24 ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad <strong>%s</strong> nicht laden. Reason: <strong>%s</strong>",
27 } catch (PathReadProtectedException $e) {
28 ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad <strong>%s</strong> nicht laden. Reason: <strong>%s</strong>",
31 } catch (DirPointerNotOpenedException $e) {
32 ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad <strong>%s</strong> nicht laden. Reason: <strong>%s</strong>",
38 // Include all classes
39 ClassLoader::getInstance()->includeAllClasses();
41 // Clean up the global namespace
42 unset($lowerClasses[3]); // Applications shall not have any middleware
45 ////// Until here the framework classes are loaded //////