The document discusses dependency injection (DI) in PHP using the BEAR framework. It shows how DI allows classes to declare dependencies without knowing how to instantiate them. The User class declares a dependency on a Storage interface without knowing the concrete class. The document provides various examples of injecting dependencies into classes through the constructor, setter methods, and a g
![BEAR DI](https://cdn-ak-scissors.b.st-hatena.com/image/square/f2a376f52119517e52fd315dbebeb47aee47eca0/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fbeardi-100209024510-phpapp01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)