Auto-inject to all services
Notice: This thread is very old.
- lutor
- Member | 27
Hi,
in stable version of Nette 2.1 auto-inject of services to properties annotated
with @inject is enabled only in presenters. Is there any possibility to
how to (for example via config.neon or any other way) turn on auto-injection of
services to properties annotated with @inject annotation to all
registered services? (as in some older dev-version of Nette 2.1 – RC3/4
I think…).
Thanks!
- Majkl578
- Moderator | 1364
Sadly, there is no way to change default behavior, not even e.g. static property. But you can write an extension which will walk all services or use Majkl578/nette-injects-extension (which doesn't require public :P).