2017 © Pedro Peláez
 

library simple-container

SimpleContainer is a simple service container with dependency injection.

image

stanlemon/simple-container

SimpleContainer is a simple service container with dependency injection.

  • Thursday, December 27, 2012
  • by stanlemon
  • Repository
  • 0 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SimpleContainer

Build Status, (*1)

SimpleContainer is a basic service container, it can store key => value objects and lazily load them using Closures. It also includes a newInstance() method which allows you to inject dependencies through constructors and setters providing for very basic dependency injection., (*2)

Example usages

Basic loading of services and retrieving of them

// Create the SimpleContainer
$container = new SimpleContainer();
// Set a service
$container->set('foo', function(){
    return new Foo();
});
// Get the service
$foo = $container->get('foo');
// Create a new class with services populaed
$bar = $container->newInstance('bar');
$bar->getFoo();

The Versions

27/12 2012

dev-master

9999999-dev http://stanlemon.net

SimpleContainer is a simple service container with dependency injection.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

dependency injection di autowire

27/12 2012

v0.1.1

0.1.1.0 http://stanlemon.net

SimpleContainer is a simple service container with dependency injection.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

dependency injection di autowire

27/12 2012

dev-develop

dev-develop http://stanlemon.net

SimpleContainer is a simple service container with dependency injection.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

dependency injection di autowire

24/12 2012

v0.1.0

0.1.0.0 http://stanlemon.net

SimpleContainer is a simple service container with dependency injection.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

dependency injection di autowire