Dependency Injection Container

A dependency injection container is a tool to make dependency injection easy to use.

The application requests an object of class Foo to the container. The container then build any dependency for that object, then build that object and returns it.

PSR-11 is related to containers.

Documentation

See also Dependency Injection (DI) Container in PHP and Create PHP Dependency Injection Container and Learn How Laravel Initiate Controller and Method with Dependency and Parameter.

Related : Dependency Injection, PHP Standards Recommendations (PSR), Container

Related packages : psr/container, pimple/pimple, php-di/php-di, illuminate/container, nette/di