X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=index.php;h=658d70ade8c82ceeeec99f9df1041907a4a23fa4;hp=8dd613285f43e9be1f2d36727d2c0e47c6cbf897;hb=40747ca36a95efb239b7b85a175eddab7da6e331;hpb=eb719958d81746a0c153a80e47e6686e8a112b8e diff --git a/index.php b/index.php index 8dd6132..658d70a 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,7 @@ readConfig('tpl_engine'), - FrameworkConfiguration::getInstance()->readConfig('tpl_engine'), - PATH, - FrameworkConfiguration::getInstance()->readConfig('tpl_base_path') - ); - eval($eval); + // Get the template instance from our object factory + $tplEngine = ObjectFactory::createObjectByConfiguredName('tpl_engine', array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io)); } catch (BasePathIsEmptyException $e) { - die(sprintf("[Main:] Die Template-Engine konnte nicht initialisieren. Grund: %s", + die(sprintf("[Main:] Could not initialize template engine for this reason: %s", $e->getMessage() )); } catch (InvalidBasePathStringException $e) { - die(sprintf("[Main:] Die Template-Engine konnte nicht initialisieren. Grund: %s", + die(sprintf("[Main:] Could not initialize template engine for this reason: %s", $e->getMessage() )); } catch (BasePathIsNoDirectoryException $e) { - die(sprintf("[Main:] Die Template-Engine konnte nicht initialisieren. Grund: %s", + die(sprintf("[Main:] Could not initialize template engine for this reason: %s", $e->getMessage() )); } catch (BasePathReadProtectedException $e) { - die(sprintf("[Main:] Die Template-Engine konnte nicht initialisieren. Grund: %s", + die(sprintf("[Main:] Could not initialize template engine for this reason: %s", $e->getMessage() )); } @@ -113,6 +111,7 @@ class ApplicationEntryPoint { // Assign variables $tplEngine->assignVariable('message', $message); $tplEngine->assignVariable('backtrace', $backtrace); + $tplEngine->assignVariable('total_objects', ObjectFactory::getTotal()); // Load the template $tplEngine->loadCodeTemplate('emergency_exit');