eval() commands replace by improved object factory, user login class stub added
[shipsimu.git] / application / selector / init.php
index cf84d6876a5d124d25ff887ce048e2a380ff8072..ed31055300d03a539260f0a8b13dc75616429a5d 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-//
-//
-// Get an instance of the initializer
-$eval = sprintf("\$app = %s::getInstance();",
-       FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
+
+// Generate call-back function
+$callback = sprintf("%s::getInstance",
+       FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
 );
-eval($eval);
+
+// Get an instance of the helper
+$app = call_user_func_array($callback, array());
 
 // Set application name and version
 $app->setAppName("Applikationsausw&auml;hler");
 $app->setAppVersion("0.1a");
-$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig("selector_name"));
+$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig('selector_name'));
 
 // Initialize output system
 require(PATH . 'inc/output.php');