eval() commands replace by improved object factory, user login class stub added
[shipsimu.git] / inc / classes / main / extended / class_SerializationContainer.php
index 54a4acb13c7d56f308d57d274df4e171ae5e5235..6d5c15de54fd078d2bf1014929174a0fc5ae1a97 100644 (file)
@@ -55,19 +55,8 @@ class SerializationContainer extends FrameworkArrayObject {
 
                        // Is the required method available?
                        if (method_exists($object, sprintf("get%s", $curr))) {
-                               // Generate a command for getting it
-                               $eval = sprintf("\$value = \$object->get%s();",
-                                       $curr
-                               );
-
-                               // Debug eval command
-                               if (defined('DEBUG_EVAL')) $limitInstance->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command: <pre><em>%s</em></pre><br />\n",
-                                       $this->__toString(),
-                                       htmlentities($eval)
-                               ));
-
-                               // Run it
-                               eval($eval);
+                               // Generate call-back function
+                               $value = call_user_func_array(array($object, sprintf("get%s", $curr)));
 
                                // Add this item to the container list
                                $containerInstance->append(array(