starter.php
Go to the documentation of this file.00001 <?php
00025
00026
00027 $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), "getInstance"), array());
00028
00029
00030 if ((empty($app)) || (is_null($app))) {
00031
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
00038 ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because 'app' is not an object.",
00039 $application
00040 ));
00041 } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
00042
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
00050 try {
00051
00052 call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
00053 } catch (FrameworkException $e) {
00054 die($e->getMessage());
00055 ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> has been terminated due to a thrown exception: <strong>%s - %s</strong>",
00056 $application,
00057 $e->__toString(),
00058 $e->getMessage()
00059 ));
00060 }
00061
00062
00063
00064 ?>