2017 © Pedro Peláez
 

library di

A simple Dependency Injection Container, PSR-11 compliant.

image

lepre/di

A simple Dependency Injection Container, PSR-11 compliant.

  • Wednesday, June 27, 2018
  • by lepre
  • Repository
  • 1 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 413 % Grown

The README.md

🚧 This project is in early development stage and it could change significantly in the future., (*1)

Lepre DI

Test library Coverage Status, (*2)

A simple Dependency Injection Container, PSR-11 compliant., (*3)

Installation

Install the latest version with Composer:, (*4)

$ composer require lepre/di:dev-master

Requirements

This project works with PHP 7.4 or above., (*5)

Basic Usage

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')
    );
});

License

This project is licensed under the MIT License. See the LICENSE file for details., (*6)

The Versions

27/06 2018

dev-master

9999999-dev https://github.com/leprephp/di

A simple Dependency Injection Container, PSR-11 compliant.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniele De Nobili