classes.php

Go to the documentation of this file.
00001 <?php
00024 // Lower framework classes
00025 $lowerClasses = array(
00026         0 => "exceptions", // Exceptions
00027         1 => "interfaces", // Interfaces
00028         2 => "main",       // General main classes
00029         3 => "middleware"  // The middleware
00030 );
00031 
00032 // Load all classes
00033 foreach ($lowerClasses as $className) {
00034         // Try to load the framework classes
00035         try {
00036                 ClassLoader::getInstance()->loadClasses(sprintf("inc/classes/%s/", $className));
00037         } catch (PathIsNoDirectoryException $e) {
00038                 ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
00039                         $className
00040                 ));
00041         } catch (PathIsEmptyException $e) {
00042                 ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
00043                         $className
00044                 ));
00045         } catch (PathReadProtectedException $e) {
00046                 ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
00047                         $className
00048                 ));
00049         } catch (DirPointerNotOpenedException $e) {
00050                 ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
00051                         $className
00052                 ));
00053         }
00054 }
00055 
00056 // Clean up the global namespace
00057 unset($lowerClasses[3]); // Applications shall not have any middleware
00058 unset($className);
00059 
00061 
00062 // [EOF]
00063 ?>

Generated on Mon Dec 8 01:06:44 2008 for Ship-Simulator by  doxygen 1.5.6