After attending ZendCon 2012 I saw how a lot of classes in ZF2 that implemented DI and had their dependencies passed to them through the constructor. ZF2 has a Service Manager that helps with this. I'm trying to learn how to implement this and learn its best practices.
And then... I loaded up the ZfcUser module and saw that the User Service was not quite following this pattern, in fact it was hiding it's dependencies behind a bunch of lazy loading getters. Now, this module was initially written by Evan Coury who is the brains behind the whole Module system in ZF2 so I know this particular module is well written or at least follows the suggested zf2 best practices.
My question is, why is this class hiding its dependencies behind getters and actually getting them from the Service Manager (which in this case it looks like it's acting pretty much like a Registry) instead of defining them explicitly in the constructor?
Isn't this in fact going against the DI principle of making dependencies explicit?