In Codeigniter, parameters from the URI are automatically made available to the method being called.
For example:
/admin/edit/news/1 in the url would mean that in the admin controller, you could do the following:
function edit($table,$id)
{
echo $table; // outputs 'news'
echo $id; // outputs '1'
}
So, in essence you are able to name and use the arguments within the method without previously having 'passed them in' in that order anywhere, and regardless of how many there are, they are still passed to the function in the order they appear in the URI.
I guess this must have something to do with the __call() magic method, but I can't get my head around how to pass them to the method being called as though they were individual arguments and not an $args array as received by the __call() method.
How is this achieved?