anandkunal / ToroPHP

Toro is a PHP router for developing RESTful web applications and APIs.
http://toroweb.org
MIT License
1.17k stars 173 forks source link

Added web/json 404 events #94

Closed MarcGodard closed 9 years ago

MarcGodard commented 9 years ago

Now you can hook into a web404 if you’re using the routing for both JSON and WEB

martinbean commented 9 years ago

This breaks backwards compatibility for any one with existing 404 hooks. I’d say check in the handler if the request is an AJAX one or not, and serve the appropriate response there.