Welcome Guest, Not a member yet? Register   Sign In
Routing and controllers
#7

[eluser]aviator2[/eluser]
[quote author="n0xie" date="1262130507"]I would just use database driven URL's.

Make a routing table. Put the url there. Put the controller you want to load there as well as the function (and maybe arguments). Extend the Router Class. Let it do it's normal checking for controllers. If it doesn't find a controller, it usually shows a 404. Override this behaviour by making it look in the database for the url. If a match is found, load the controller and function you associated with it in your database. Else show a 404.[/quote]

Nice one, I like it!
Can you link me to some resource, where can I find inspiration how to modify a router class?


Messages In This Thread
Routing and controllers - by El Forum - 12-29-2009, 09:27 AM
Routing and controllers - by El Forum - 12-29-2009, 10:01 AM
Routing and controllers - by El Forum - 12-29-2009, 11:48 AM
Routing and controllers - by El Forum - 12-29-2009, 11:49 AM
Routing and controllers - by El Forum - 12-29-2009, 11:51 AM
Routing and controllers - by El Forum - 12-29-2009, 11:54 AM
Routing and controllers - by El Forum - 12-29-2009, 12:05 PM
Routing and controllers - by El Forum - 12-30-2009, 06:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB