dev-master
9999999-dev https://github.com/leprephp/diA simple Dependency Injection Container, PSR-11 compliant.
MIT
The Requires
- php ^7.0
- psr/container ^1.0
The Development Requires
by Daniele De Nobili
A simple Dependency Injection Container, PSR-11 compliant.
🚧 This project is in early development stage and it could change significantly in the future., (*1)
A simple Dependency Injection Container, PSR-11 compliant., (*3)
Install the latest version with Composer:, (*4)
$ composer require lepre/di:dev-master
This project works with PHP 7.4 or above., (*5)
use Lepre\DI\Container; $container = new Container(); // register a service: $container->set('my service', function () { return new MyService(); }); // register a service with dependencies: $container->set('other service', function (Container $container) { return new OtherService( $container->get('my service') ); });
This project is licensed under the MIT License. See the LICENSE file for details., (*6)
A simple Dependency Injection Container, PSR-11 compliant.
MIT