What does 'dependency injection' solve in PHP?

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.

链接地址: http://www.djcxy.com/p/14408.html

上一篇: 解释依赖注入

下一篇: '依赖注入'在PHP中解决了什么?