Passing params to method from url
===

I'm writing my own framework (for learning) and I am at the stage where I want to pass parameters to a method. at the moment I'm achieving this via:

    $params = array_slice($url, 1);
    $class->{$method[1]}($params);

then in the method of the class I have `$params = func_get_arg(0);`
This works but is not ideal, I notice that in Codeigniter you can call 

`http://domain.com/controller/method/p1/p2/p3`...

then in the method you get these via

`method($p1, $p2, $p3){}`

This is what I would prefer. How would I set this up?

*ps: my classes all extend a base class*
