Closed mattsnowboard closed 11 years ago
I'm sorry to announce that there is no 'great' solution to your problem. The only solution for us is to directly inject the whole container (BAD PRACTICE). We have planned to 'redo' this part of the bundle (map factory) but as it is something quite sensible it's gonna take some time.
The issue is now fixed. I let it open still the doc is not fixed.
I've been making my controllers as services and wanted to use the ivory_google_map.map service. But injecting it the normal way through a setter doesn't work because ivory_google_map.map has prototype scope.
It seems to me like I wouldn't want the Controller to be in the prototype scope. So how should I inject this service? Am I missing something? It sounds like it's a "bad" idea to inject the whole service container if I don't need to (http://symfony.com/doc/current/cookbook/service_container/scopes.html). Ideally I'd just like to inject something like a "map factory" but that doesn't seem to exist.