shudder, 7 months ago @bobmagicii It's called service locator and it's an anti pattern. You can use it in abstract factory class/callback, where there won't be any dependency on (reference to) values returned from container. You can also define composition in container itself - it will fail early in concrete place (front controller), so no major drawbacks.
@bobmagicii It's called service locator and it's an anti pattern.
You can use it in abstract factory class/callback, where there won't be any dependency on (reference to) values returned from container.
You can also define composition in container itself - it will fail early in concrete place (front controller), so no major drawbacks.