On Fri, Aug 23, 2013 at 3:05 PM, Matthew Weier O'Phinney
<[email protected]>wrote:
> Just for argument's sake, why are you using Zend\Di instead of
> Zend\ServiceManager? Is there a compelling reason?
>
>
Purely for the sake of a co-worker's request and desire. He didn't like
hard coding of a ServiceManager alias name, even if it was an alias. He
comes from a Java background and rather see DI than SM aliases.
However, if there is a compelling reason to use SM over DI with ZFW, I
could easily convince him otherwise.
In my example, I originally use $sm->get('Firmware\PlatformObject'); and it
does work perfectly. And he just rather see: $this->getPlatformObject()
where platformObject is injected into our controller by the framework. I
wanted to compare the two different approaches, and select the best option.
---
Philip
[email protected]
http://www.gpcentre.net/