<?php
/**
- * Starter of the application
+ * The application launcher
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Get the application helper instance
-$app = ApplicationHelper::getInstance();
+// Is there an application helper instance? We need the method main() for
+// maining the application
+$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), "getInstance"), array());
// Some sanity checks
if ((empty($app)) || (is_null($app))) {
// Call the entry point method
try {
- $eval = sprintf("%s::getInstance()->%s();",
- FrameworkConfiguration::getInstance()->readConfig('app_helper_class'),
- FrameworkConfiguration::getInstance()->readConfig('entry_method')
- );
- eval($eval);
+ // Call user function
+ call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
} catch (FrameworkException $e) {
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched for the follwing reason: <strong>%s</strong>",
$application,