*/
class SerializationContainer extends FrameworkArrayObject {
/**
- * Public constructor, if you like to have an object of this class...
+ * Protected constructor, must stay as public... *sigh*
*
* @return void
*/
* hold the attributed and their values which we have specified in
* the limitation object.
*
- * @param $limitInstance The instance to the object ObjectLimits
- * @param $object The origin object. We don't touch it here.
- * @return $containerInstance An instance of SerializationContainer
+ * @param $limitInstance The instance to the object ObjectLimits
+ * @param $object The origin object. We don't touch it here.
+ * @return $containerInstance An instance of SerializationContainer
* @throws GetterNotFoundException If a getter was not found
*/
public final static function createSerializationContainer (ObjectLimits $limitInstance, FrameworkInterface $object) {
// 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(