Fork me on GitHub

Advanced Service Container Utilization

Richard Miller(39:19) Binoculars Image

sourced from Symfony

RATE THIS


Symfony2's service container is a powerful tool with capabilities for much more than just basic constructor and setter injection. This talk will look at some of the more advanced service container features. Starting by looking at property injection and its pros and cons and why interface injection is not available. It will cover how you can use factories to create services as well as why this may be a useful feature.

It will then move onto another useful feature of defining parent services for reducing the configuration overhead when managing services with many common dependencies. The ability to tag services will be looked at as a way for getting your services registered before moving onto how to use compiler passes to register tagged services with your own services. This will be followed by a more general look at compiler passes and the compilation process. Finally it will take a look at this issue of the scope of services within the container.


COMMENT