X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fselector%2Finit.php;h=faba5c4c78fc710ed9422a495d41a3c0c86b7e89;hb=40747ca36a95efb239b7b85a175eddab7da6e331;hp=cf84d6876a5d124d25ff887ce048e2a380ff8072;hpb=b226bbefe6bc09bcd75432c3c3ba32bf7da45b71;p=shipsimu.git diff --git a/application/selector/init.php b/application/selector/init.php index cf84d68..faba5c4 100644 --- a/application/selector/init.php +++ b/application/selector/init.php @@ -24,18 +24,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -// -// -// Get an instance of the initializer -$eval = sprintf("\$app = %s::getInstance();", - FrameworkConfiguration::getInstance()->readConfig("app_helper_class") -); -eval($eval); - -// Set application name and version -$app->setAppName("Applikationsauswähler"); -$app->setAppVersion("0.1a"); -$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig("selector_name")); // Initialize output system require(PATH . 'inc/output.php'); @@ -46,5 +34,22 @@ require(PATH . 'inc/file_io.php'); // Include the language sub-system require(PATH . 'inc/language.php'); +// Generate call-back function +$callback = sprintf("%s::getInstance", + FrameworkConfiguration::getInstance()->readConfig('app_helper_class') +); + +// Get an instance of the helper +$app = call_user_func_array($callback, array()); + +// Set application name and version +$app->setAppName("Applikationsauswähler"); +$app->setAppVersion("0.1a"); +$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig('selector_name')); + +// Set instances +$app->setFileIoInstance($io); +$app->setLanguageInstance($lang); + // [EOF] ?>