Welcome Guest, Not a member yet? Register   Sign In
A more-useful uri_to_assoc
#16

[eluser]jazzfanatic[/eluser]
I think you are misunderstanding my example as I forgot the function name. My custom routes make me forget it sometimes.

I put - what.com/users/list/search/id/id/5

and meant

what.com/users/list/search/id/id/5

users would be the controller, and search, and id are the parameters. I was simply saying that the value of a parameter could be the name of a parameter simply from user input or selection that has nothing to do with the programmer choosing poor controller names.

The function suggested is still very lightweight, and it separates the parameters from the controller, just like GET works. There are good reasons in a url like http://www.this.com/what.html?this=that, that a standard GET only takes what is after the ?. I think it is pretty nice to not worry about accessing anything but the parameters, but hey, it is just my opinion. I think one reason I like it so much, is that I have the router hacked so that we can go as deep into the folders as possible. So if I had what.com/members/profile/sharing/edit/save/1, and sharing is the controller with edit as the function, with the first example I just have save => 1 as the only pair. I do agree, for the general person yours works well, just the first example is an option if you want.


Messages In This Thread
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 03:34 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 05:18 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 08:59 PM
A more-useful uri_to_assoc - by El Forum - 04-24-2009, 09:28 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 12:19 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 02:56 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 03:09 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 04:18 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 04:46 PM
A more-useful uri_to_assoc - by El Forum - 05-17-2009, 06:37 PM
A more-useful uri_to_assoc - by El Forum - 05-21-2009, 01:14 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 02:52 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 03:23 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 03:38 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:21 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:31 PM
A more-useful uri_to_assoc - by El Forum - 06-04-2009, 04:46 PM
A more-useful uri_to_assoc - by El Forum - 06-05-2009, 12:50 AM
A more-useful uri_to_assoc - by El Forum - 07-10-2009, 10:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB