Tag Archive
Dependency Injection
Discover 2 stories with “Dependency Injection” Tag.

Overview Dealing with Dependency Injection of services in factories, how many times have you seen kind of code below? public interface MyService { ... } @Component public class MyServiceFirst implements MyService { ... } @Component public class MyServiceSecond implements MyService { ... } @Component public class MyFactory { private final
Read More

Service dependencies injection Symfony2 service container handles services in a kind of lazyness. A service is never registered until it is invoked. But what about service dependencies? Well, when a service is invoked for the first time, Symfony2 registers its
Read More