News for hackers. Stuff that matters.
Re:Toro - a php micro-router with great examples by lux on Thursday August 23, 2012 @03:53PM (#4424488)
Not that I've looked at it in much depth, but those just look like simplistic examples to show how the routing works. If it's just a router, then how you render views is beyond the scope of the library, and cutting corners in examples for the sake of expediency doesn't seem so bad.
Re:Toro - a php micro-router with great examples by mootothemax on Thursday August 23, 2012 @05:18PM (#4424903)
Not that I've looked at it in much depth, but those just look like simplistic examples to show how the routing works. If it's just a router, then how you render views is beyond the scope of the library, and cutting corners in examples for the sake of expediency doesn't seem so bad.

I'm fine with the idea of a router simply being a router; I really take exception to yet more PHP examples illustrating bad coding habits being on the web though.

Re:Toro - a php micro-router with great examples by lux on Thursday August 23, 2012 @07:48PM (#4425496)
I can agree with that. Even just changing it from

include("views/articles.php");

to

return view ('articles');

would be better...