Essential PHP-DI is a dependency injection container for PHP
Essential PHP-DI requires PHP version 7.0 or greater
$ composer require essential-php/php-di "~1.0"
Or alternatively, include a dependency for essential-php/php-di
in your composer.json
file. For example:
{
"require": {
"essential-php/php-di": "^1.0"
}
}
use Essential\Di\Container;
$container = new Container();
$container->add('foo.bar', FooBar::class)
$fooBar = $container->get('foo.bar')
Bug reports can be submitted on the Github Issue Tracker.
MIT License. See LICENSE for information.