yui/yui3 — pull request #1201 by ericf (2013-09-17 20:58:21+00:00)
Title: Expand Router's `req` objects and refector `_dispatch()` method to take `req` and `res` objects

This adds two new properties to Router's `req` objects:

* `route`: Reference to the current route object whose callbacks are being dispatched.
* `router`: Reference to the router instance.

This also changes Router's dispatching process to take `req` and `res` objects before dispatching to its router handlers. This gives control to the code with triggers Router to dispatch to create the `req` and `res` objects.

Previously, router would create the `req` and `res` object inside its `_dispatch()` method and pass them along to the route handlers. Now the `_dispatch()` method takes `req` and `res` objects allowing the places that call the method a chance to create these objects.