X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Floader.php;h=12b388beb3ebde03f5376cd38b94236ca87b49fc;hb=e7b6bb41a597f86c8f9bd8871d499f3ee237be19;hp=e6cf6503ff7d55137590ecfaad4087409a8779c6;hpb=55b327a3f5f2fe1d244532e07be7444e94b2a768;p=shipsimu.git diff --git a/application/ship-simu/loader.php b/application/ship-simu/loader.php index e6cf650..12b388b 100644 --- a/application/ship-simu/loader.php +++ b/application/ship-simu/loader.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -26,40 +26,14 @@ $cfg = FrameworkConfiguration::getInstance(); // Load all classes for the application -foreach ($lowerClasses as $class) { - // Try to load the application classes - try { - ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), $class)); - } catch (PathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:%s] Cannot find application classes in path %s for this reason: %s", - $application, - $class, - $e->getMessage() - )); - } catch (PathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:%s] Cannot find application classes in path %s for this reason: %s", - $application, - $class, - $e->getMessage() - )); - } catch (PathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:%s] Cannot find application classes in path %s for this reason: %s", - $application, - $class, - $e->getMessage() - )); - } catch (DirPointerNotOpenedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:%s] Cannot find application classes in path %s for this reason: %s", - $application, - $class, - $e->getMessage() - )); - } -} +foreach ($lowerClasses as $className) { + // Load the application classes + ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), $className)); +} // END - if // Clean up the global namespace unset($lowerClasses); -unset($class); +unset($className); // [EOF] ?>