Welcome Guest, Not a member yet? Register   Sign In
Remap
#1

[eluser]Unknown[/eluser]
I am using remap to make my thing a bit RESTful....

Code:
public function _remap($method, $params = array())
    {
        if (method_exists($this, $method)):
            return call_user_func_array(array($this, $method), $params);
        else:
        //some other stuff
        endif;
   {
function theonewithparams($id,$params) {
//how do i get params?
}

My question is how to i get params in the function i am passing them too... it seems like it would make sense, but the "call_user_func_array()" doesn't seem to work like i expected.

How do i call the $params in the next function?
#2

[eluser]CroNiX[/eluser]
call_user_func_array() only sends a single array of parameters to the callback, so your method should only accept one arg which would be the $params array.

Code:
function theonewithparams($params) {




Theme © iAndrew 2016 - Forum software by © MyBB