Page 1 of 1

"forwarding" passed params to function

Posted: Thu Jun 10, 2010 2:31 am
by linwj

Code: Select all

public function __call($method, $params) {
	$rerout_method = $this->route . '_' . $method;  #sets the name of the new method to be called
        #$this->method_extra_params[$method] contains the extra parameters for the method
        # problem...
}
*heres the problem

how do I do something like
$rerout_method(passed in params + additional params) ?

even when I try something like

Code: Select all

$rerout_method($params);
it doesnt work

anyone have any ideas on this ?
or possibly point me towards some keywords to search up on



-thanks

Re: "forwarding" passed params to function

Posted: Thu Jun 10, 2010 3:29 am
by requinix
You haven't quite spelled it out but I think you're looking for call_user_func_array.