Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Adding functionality to inject dependencies into an existing object #89
I've added functionality for injecting into an existing object. This is handy under certain testing circumstances and when you lack complete control over the instantiation of an object for some reason.
I added this functionality so that I could easily use PHP-DI in ZF2. While I haven't figured out a graceful way to use PHP-DI to instantiate controllers in ZF2's version of the dispatcher, I can at least get the resulting controller from Dispatch() and inject it after the fact.
Think this is worth integrating into your code base?
Hi, this is awesome. We were talking about this in #84 so this would fit great for a v3.3.
By the way if you have integrated it with ZF2, I would love to know how you did it, I can add it to the documentation (or if you have time and motivation you can also submit a PR with a new documentation file).
I've look more closely at your PR in the next days.
And by the way it seems your commits show your name as author, but are not linked to your GitHub account (there is no link on your name). It's not really a problem unless you want your commits to link to your account, and to be correctly recognized as a "contributor" to the project by Github.
I've had this problem too, unless you do this on purpose this is probably because you don't have the email set up either in git, or in github. See: Commits on GitHub don't link to my account
Thanks, I hadn't yet set my public e-mail up properly on github.
On Wed, Jul 24, 2013 at 3:43 PM, Matthieu Napoli