2017 © Pedro Peláez
 

library dependency-injection-container

image

systream/dependency-injection-container

  • Friday, September 8, 2017
  • by systream
  • Repository
  • 2 Watchers
  • 1 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Repository

For saving models with repository pattern., (*1)

Installation

You can install this package via packagist.org with composer., (*2)

composer require systream/dependency-injection-container, (*3)

composer.json:, (*4)

"require": {
    "systream/dependency-injection-container": "1.*"
}

This library requires php 5.6 or higher, but also works on php 5.4., (*5)

Usage

$di = new DependencyInjectionContainer();
$di->bind(FixtureTestInterface::class, function () {
    return new ObjectA();
});

$di->has(FixtureTestInterface::class); // will return true

$instance = $di->get(FixtureTestInterface::class); // will return ObjectA instance 

Create


class TestObjectB { public function __construct(FixtureTestInterface $test) { } } $di = new DependencyInjectionContainer(); $di->bind(FixtureTestInterface::class, function () { return new ObjectA(); }); $testObject = $di->create(TestObjectB::class);

Test

Build Status, (*6)

The Versions

08/09 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management

08/09 2017

1.2.1

1.2.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management

07/09 2017

1.2.0

1.2.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management

06/11 2016

1.1.1

1.1.1.0

  Sources   Download

MIT

The Requires

  • php >=5.4.0 || >= 7.0

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management

01/11 2016

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.4.0 || >= 7.0

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management

01/11 2016

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.4.0 || >= 7.0

 

The Development Requires

by Peter Tihanyi

dependency injection container dependency management