2 // Is there an application helper instance? We need the method main() for
3 // maining the application
4 $app = ApplicationHelper::getInstance();
7 if ((empty($app)) || (is_null($app))) {
8 // Something went wrong!
9 ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden, da die Hilfsklasse <strong>%s</strong> nicht geladen ist!",
11 FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
13 } elseif (!is_object($app)) {
15 ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden, da die 'app' kein Objekt ist!",
18 } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig("entry_method"))) {
20 ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden, da die Methode <strong>%s</strong> fehlt!",
22 FrameworkConfiguration::getInstance()->readConfig("entry_method")
26 // Call the entry point method
28 $eval = sprintf("%s::getInstance()->%s();",
29 FrameworkConfiguration::getInstance()->readConfig("app_helper_class"),
30 FrameworkConfiguration::getInstance()->readConfig("entry_method")
33 } catch (SocketCreationException $e) {
34 // Problems while creating sockets
35 ApplicationEntryPoint::app_die(sprintf("[Main:] Das Hub konnte nicht initialisiert werden. Reason: %s, Code: %s",
39 } catch (SocketSetupException $e) {
40 // Problems while setting up sockets
41 ApplicationEntryPoint::app_die(sprintf("[Main:] Das Hub konnte nicht initialisiert werden. Reason: %s, Code: %s",
45 } catch (SocketBindException $e) {
46 // Problems while binding to address/port
47 ApplicationEntryPoint::app_die(sprintf("[Main:] Das Hub konnte nicht initialisiert werden. Reason: %s, Code: %s",
51 } catch (SocketListeningException $e) {
52 // Problems while starting listen to the socket
53 ApplicationEntryPoint::app_die(sprintf("[Main:] Das Hub konnte nicht initialisiert werden. Reason: %s, Code: %s",