/
Inappropriate "eval" usage in kBase::makeClass method (optimization)

Inappropriate "eval" usage in kBase::makeClass method (optimization)

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/21f5102cb136107e#

Method kBase::makeClass is calling ref_call_user_func_array no matter if he has only class name or class name + constructor arguments passed. This slows downs the things a little bit. I propose to use code, mentioned above, that was called from kFactory class to optimize things.

if ( func_num_args() == 1 ) {
    $class = new $real_class();
}
else {
    $func_args = func_get_args();
    $pseudo_class = array_shift($func_args);
    $class =& ref_call_user_func_array( Array ($real_class,'makeClass'), $func_args );
}

Related Tasks

INP-392 - Getting issue details... STATUS