codeguy/Slim — pull request #837 by gmanricks (2014-06-05 08:00:13+00:00)
Title: Route contexts

Added the ability to bind contexts to routes. By default if no context is set the slim app object will be used allowing you to run things like `$this->render();` in your routes without pulling the `$app` variable into scope.

This PR also adds a `Slim` setting 'routes.context' which can be used to set a default context object for all routes (instead of the Slim app object).

On the route object you have two new methods `getContext()` and `setContext(object)` which can be used to get and set the routes personal context.