News for hackers. Stuff that matters.
Re:Toro - a php micro-router with great examples by mmcnickle on Thursday August 23, 2012 @04:35PM (#4424689)
Not really, most frameworks use a router to ensure the application has a single point of entry. Most PHP frameworks adopt a router too. A very common use case that requires a router that .htaccess wouldn't provide is if you want to have some middleware run before or after a request (for setting cache values for some resources and not others). There are other benefits too when it comes to testing as you can test (route) requests to views without having to make a call to the server.

Edit: Removed unnecessary snarky comment.

There are no comments on this comment yet.