PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Lars Strojny's Blog: Dependency Injection Container Refactorings, Part Two

Note: This article was originally published at PHPDeveloper on 10 May 2011.
PHPDeveloper

Lars Strojny has posted the second part of his look at dependency injection and the refactoring it makes possible. If you'd like to start from the beginning, you can read about part one here.

He breaks it up into two sections (really three, but he advises to ignore the third):

    Introducing a parameter in to the dependency injection container's configuration
  • Setting it up to allow for checks against the environment (development, production, etc)

Code samples and example XML configurations are included for both points to help make them clearer.