mattstauffer/IlluminateNonLaravel — pull request #2 by reinink (2014-08-25 16:05:22+00:00)
Title: Add IoC Container example.

Using the Illuminate/Container outside of Laravel is actually quite easy. However, since this is a more advanced topic, giving simple/beginner examples is a little challenging. I used some mock classes to help illustrate both how to use the IoC container, and in what situations it might make sense to do so.

When using Slim route callbacks, the container can quickly start looking like a service locator. To help prevent confusion here, I also gave a controller example that uses automatic class resolution.

Finally, as discussed on Twitter, I've split this example into two sections: "Bootstrap" and "Routes".