PHP Architect · Vol 21, Issue 11 · November 2022
PSR Pickup: PSR-11: Container Interface
by Frank Wallen
In this issue, we’ll discuss the Container Interface, PSR-11. The Container’s job is to act as a registry and return a service object identified by a unique key or name. Many modern frameworks and codebases implement Dependency Injection as a form of inversion of control, where the client requesting the service object does not need to know how to construct it. Usually, containers return service objects, but it could really be any valid object in the application. The responsibilities of the Container are configuring and fetching entries, leaving it up to the framework to fetch the necessary objects to compose the application.
The full article is in PHP Architect Vol 21, Issue 11. Subscribe to read it and every new issue.