From Router To Controller

Hi,
I have an application which I am currently writing that I am
dividing up into re useable plugins.
Each plugin needs to know as little as possible about its
surroundings.

So, for example - I have a forum plugin and a ‘forum’ can belong to
something - whether that is a ‘User’, a ‘Site’ or anything else - the
forum knows nothing of these.
BUT, if I have a URL like this - /sites/1/users/3/forums/2
I do not want to just look at the forum id number 2 - I want to fetch
site 1, then find user 3 in its related users, then find forum 2 in
its related forums. So, if the url is incorrect, you will quite
rightly get a 404 error or something.

The router passes site_id and user_id into the params array of the
controller, however I do not know in which order.
Is there a way that my controller can find the order of the params in
the original url ? Remember, the forum knows nothing of sites or
users or anything else that either I or another developer wants to
throw at it.

Hope this makes some sense - I am tired as I am typing this :slight_smile:

Cheers

Gary