-foreach ($lowerClasses as $class) {
- // Try to load the application classes
- try {
- ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", FrameworkConfiguration::getInstance()->readConfig("application_path"), $application, $class));
- } catch (PathIsNoDirectoryException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
- $class,
- $e->getMessage()
- ));
- } catch (PathIsEmptyException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
- $class,
- $e->getMessage()
- ));
- } catch (PathReadProtectedException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
- $class,
- $e->getMessage()
- ));
- } catch (DirPointerNotOpenedException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
- $class,
- $e->getMessage()
- ));
- }
-}
-
-// Include all classes
-ClassLoader::getInstance()->includeAllClasses();
+foreach ($lowerClasses as $className) {
+ // Load the application classes
+ ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className));
+} // END - if