codeguy/Slim — pull request #822 by danielgsims (2014-05-05 13:26:11+00:00)
Title: Callable Resolver

I moved the responsibility of creating the callable to a new dependency called a Callable Resolver. In the App constructor, I created a default Resolver that creates route callable methods the exact way they are created now. In addition, I created two more Resolvers. One by default will inject the Slim Pimple container into the constructor. The other will look for services inside of Pimple. For example, if you say "mycontroller:index", it will look for $app['mycontroller'] and call the index method on that controller. There is an interface to create your own Resolver.

To implement a resolver, you just change the $app['resolver'] class prior to adding routes.

I have some questions in this which I would like to discuss. For one, I made Pimple a dependency, but maybe it should be the Slim application itself. Also, I'm curious on naming. Third, I haven't written tests/doc for this but all current tests pass. I wanted to chat about this rough draft and nail it out