2017 © Pedro Peláez
 

library dependency-injection

Easy-to-use Dependency Injection in PHP

image

digitalwindow/dependency-injection

Easy-to-use Dependency Injection in PHP

  • Friday, March 21, 2014
  • by AgileTillIDie
  • Repository
  • 2 Watchers
  • 4 Stars
  • 159 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Awin\DependencyInjection

Dependency injection for PHP, (*1)

Usage Examples

$injector = new \Awin\DependencyInjection\DependencyInjector;
$injector->configureDependencyParamValue('Foo', 'param1', 'value to use in constructor');
$injector->configureDependencyParamClass('Foo', 'param2', '\Bar');
$foo = $injector->get('Foo')';

Configuration-Free Usage

Simply type-hint the constructor parameters of your dependency, and you needn't offer any configuration information to the injector - it will use reflection to figure out what is needed., (*2)

E.g.:, (*3)

class Foo
{
    public function __construct(Bar $param)
    {
        //...
    }
    //...
}
$foo = $injector->get('Foo'); // Constructor param retrieved recursively from
                              // injector at this point, based on type-hint.

Build Status, (*4)

The Versions

21/03 2014

dev-master

9999999-dev

Easy-to-use Dependency Injection in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

21/03 2014

1.0.7

1.0.7.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

16/03 2014

1.0.6

1.0.6.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

07/02 2014

1.0.4

1.0.4.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

06/02 2014

1.0.2

1.0.2.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

06/02 2014

1.0.1

1.0.1.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di

06/02 2014

v1.0.0

1.0.0.0

Easy-to-use Dependency Injection in PHP

  Sources   Download

The Requires

  • php >=5.3.3

 

The Development Requires

dependency injection di