The essential of dependency injection container

dev-master 2016-12-25 08:12 UTC

README

Essential PHP-DI is a dependency injection container for PHP

Requirements

Essential PHP-DI requires PHP version 7.0 or greater

Installation

$ 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"
    }
}

Usage

use Essential\Di\Container;

$container = new Container();
$container->add('foo.bar', FooBar::class)
$fooBar = $container->get('foo.bar')

Issues

Bug reports can be submitted on the Github Issue Tracker.

License

MIT License. See LICENSE for information.