I understand, that if I use non shared service, I will get new instance everytime I request that service. That will allow me to safely use class properties within such service, what wouldn't be wise if I did that on shared service - it would be bit similar to concurrency issues.
However, whats the non shared service advantages to the plain old php objects?
I can think only of getting DI container access inside service object out of box, but that wouldn't be big problem, as I could pass what I need to constructor or setter of POPO anyway.
Am I missing something?
Aucun commentaire:
Enregistrer un commentaire