Possible Duplicate:
What is dependency injection?
What is the hipe around 'dependency injection' adapted from Java and introduced in Symfony 2? Could someone give an example of a problem and a solution with and without a dependency injection?
Explanation that fits to PHP: http://fabien.potencier.org/article/11/what-is-dependency-injection
BTW: It's not from Java world only. DI and variations of DIC are used in most of high level programming languages. It's an universal practice helping you to write more maintanable code.
精彩评论