Revisions

This commit is contained in:
happyaccidents
2013-11-28 14:00:56 +00:00
committed by Josh Lockhart
parent 5e0f12004c
commit aaebe65095
3 changed files with 20 additions and 14 deletions

View File

@@ -4,5 +4,10 @@ title: Dependency Injection
# Dependency Injection {#dependency_injection_title}
Dependency Injection is a basic concept that solves a complex problem. As a software design pattern it is being adopted in
some way or another by all major PHP projects.
From [Wikipedia](http://en.wikipedia.org/wiki/Dependency_injection):
> Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it
> possible to change them, whether at run-time or compile-time.
This quote makes the concept sound much more complicated than it actually is. Dependency Injection is providing a component
with it's dependencies either through constructor injection, method calls or the setting of properties. It is that simple.