-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IoC Container #1257
Comments
We're using Pimple in our li3 app and I've found really hard to inject controllers. It would be great if li3 had bindings to implement whatever IoC container you want. |
Also, the documentation for the current implementation is sparse: http://li3.me/docs/manual/architecture/dependencies.md |
@fedeisas Yes it's sparse, as sparse can get. Please open a ticket over at https://github.com/UnionOfRAD/manual so we have something to track it. Needless to say that we'd be glad for help expanding it ;) |
Hi @DavidPersson! I'd gladly write it, but I have to say I don't understand how this injection is supposed to work. The Anyway, it would be great to have working examples on how to use those features. |
I can shed some light on it :) |
Since dependency injection can be done via $_classes, this is helpful in methods for doing static::_instance('ClassName') to get an instance of the class you want, so that tests can override certain methods.
An IoC Container would be a welcome addition, so that Instances can be instantiated in the parameter list rather than doing the call to _instance() ourselves.
Is this something that would be considered for the roadmap?
The text was updated successfully, but these errors were encountered: