Hello,
I want to add a method to an existing object. Any ideas how to?
I tried using
foreach($this->modules->$module_name->methods as $mod_method =>
$method_name) {
$function = '$args = implode(",", func_get_args());';
$function .= 'return
mod_'.$module_name.'::'.$mod_method.'($args);';
$lambda = create_function('', $function);
$lambda(1);
$this->$method_name = $lambda;
}
The error I got was "Fatal error: func_get_args(): Can't be used as a
function parameter in ...: runtime-created function on line 1" when I called
$lambda()
Is there a way I can know the arguments of a defined method without calling
the method?
Thank you,
Brian Takita
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php