PHP Dependency Injection Creates More Maintainable Code
May 02, 2011, 03:09 (0 Talkback[s])
(Other stories by Jason Gilmore)
WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
"Although not originally conceived as such, PHP has over the
years evolved into a very capable object-oriented language, with
countless enterprise projects and a number of powerful frameworks
such as Symfony taking full advantage of these mature features.
"Of course, the advantages of object-orientation can only be
fully exploited when implemented in conjunction with best practices
such as encapsulation and inheritance. One such "implementational"
best practice is dependency injection, a design pattern that
facilitates the decoupling of otherwise dependent components."