Tag: Dependency Injection

Dependency Injection in PHP

Dependency is an object, a class needs to function. For example, if your class needs to log something using a logger object, that means it has a dependency on that object. Now, let’s see what Dependency Injection is. Many years ago, Martin Fowler wrote an article¹ that introduced the term Dependency Injection. It’s a technique, …