2017 © Pedro Peláez
 

library bubbles

Bubbles DI Container

image

acvos/bubbles

Bubbles DI Container

  • Thursday, May 28, 2015
  • by acvos
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Bubbles DI

Build Status, (*1)

Minimalistic, extensible, lazy dependency injection container., (*2)

Why?

It's always good to follow best practices even when you don't use a full-stack framework. If you are writing a small, focused back-end service or script, but still want the full power of DI, Bubbles would help turning your plain old PHP classes into injectable services., (*3)

How?

Installation, (*4)

composer require acvos/bubbles

Usage, (*5)

// Instantiating Bubbles facade
$bubbles = new Acvos\Bubbles\ContainerManager();

// Obtaining new DI container
$container = $bubbles->spawn();

// Configuring dependencies
$container
    ->register('zzz', 200)
    ->register('test.service', 'Acvos\Bubbles\Example\TestService')
        ->addDependency('Setter injection example', 'bob')
        ->addDependency('@zzz', 'bar')
        ->addDependency(100, 'foo')
    ->register('test.another.service', 'Acvos\Bubbles\Example\TestService')
        ->addDependency('@test.service')
        ->addDependency('zzz');

// Getting our class instance as a DI service
$service = $container->get('test.another.service');

The Versions

28/05 2015

dev-master

9999999-dev

Bubbles DI Container

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Anton Chernikov

container configuration dependency di injection

28/05 2015

1.0.1

1.0.1.0

Bubbles DI Container

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Anton Chernikov

container configuration dependency di injection

28/05 2015

1.0.0

1.0.0.0

Bubbles DI Container

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Anton Chernikov

container configuration dependency di injection