I'm trying to call a function and pass an infinite amount of parameters from an array. This is for use in an HMVC framework to call the controller and pass X amount of parameters so I also welcome any better approaches to this as well.
I'm calling my function like this where $params is an array of a potentially infinite amount of values:
controller::$action($params);
Then the params would be fully configurable by the programmer in the controller. This would be my example for the edit action:
public static function edit($id = false, $group = 'default', etc.){
// Something
}
call_user_func_array