Marg - A Simple Request Router written in PHP(vaidikkapoor.info)
vaidikkapoor.info
Marg - A Simple Request Router written in PHP
http://vaidikkapoor.info/blog/marg.html
3 comments
Up vote for the effort. This seems to be one of the many PHP routers in existence these days. To bad you didn't model it after the routing used in Kohana. That's still the best and most flexible routing I've seen so far.
Thanks for pointing out. I haven't seen Kohana at all actually. Will check it out soon.
nice! probably no one except me will upvote this b/c its PHP which is so uncool. But I think this is a really thin, nice lib, though I would say you're gonna have problems with your REQUEST_URI if you're depending on PATH_INFO (check out the getRequestUri in Symfony2 httpfoundation for good fallbacks). I know its supposed to be micro, but you might want to consider extending the request class for other basic stuff people would like to use like HEAD / PUT / DELETE, good job though :)
Couldn't imagine getting a response so early! :o Thanks for that quick response! :)
I know about how PHP is considered uncool around here. I am not here to debate that. Personally I use Python more but I started off with PHP 3 years back and I do use it sometimes for quick prototyping. Its not all that bad for everything. Is it? I guess you'd agree.
Yes, PATH_INFO is an issue I am aware of. Thanks for that Symfony reference. I will definitely check out how they do it.
The request class can still handle other HTTP methods like HEAD / PUT / DELETE. The verb property ($request->verb) has the HTTP method used for the incoming request. Therefore, you can handle different HTTP methods as well.
Thanks once again!
I know about how PHP is considered uncool around here. I am not here to debate that. Personally I use Python more but I started off with PHP 3 years back and I do use it sometimes for quick prototyping. Its not all that bad for everything. Is it? I guess you'd agree.
Yes, PATH_INFO is an issue I am aware of. Thanks for that Symfony reference. I will definitely check out how they do it.
The request class can still handle other HTTP methods like HEAD / PUT / DELETE. The verb property ($request->verb) has the HTTP method used for the incoming request. Therefore, you can handle different HTTP methods as well.
Thanks once again!
Screw the haters. Modern PHP frameworks like Laravel and Symfony are pretty cool if you ask me.
Well I like it. Simple,Easy to pick up and integrate. Looking forward to use and contribute.
It was a weekend project and I worked on it for my personal use and to apply whatever I had learned in the past few months. Its new and it perhaps needs a lot of work.
I'd be really happy to get some feedback. Positives and negatives, both!