Routing

Once the request is received by our application, we need to forward that request to a handler.

We do this by having pre-defined routes which pattern-match URI's. If a requested uri matches the pattern for a route, the request is then forwarded on to the correct handler for that route.

A handler is simply a callable function which has custom handling for requests to URI's matching that particular route. It can be a callback, a function, or an array containing an object and the name of a method on that object.


Complete and Continue  
Discussion

2 comments