starter.php

Go to the documentation of this file.
00001 <?php
00025 // Is there an application helper instance? We need the method main() for
00026 // maining the application
00027 $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), "getInstance"), array());
00028 
00029 // Some sanity checks
00030 if ((empty($app)) || (is_null($app))) {
00031         // Something went wrong!
00032         ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
00033                 $application,
00034                 FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
00035         ));
00036 } elseif (!is_object($app)) {
00037         // No object!
00038         ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because &#39;app&#39; is not an object.",
00039                 $application
00040         ));
00041 } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
00042         // Method not found!
00043         ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
00044                 $application,
00045                 FrameworkConfiguration::getInstance()->readConfig('entry_method')
00046         ));
00047 }
00048 
00049 // Call user function
00050 call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
00051 
00052 // [EOF]
00053 ?>

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