2017 © Pedro Peláez
 

library dirty-needle

Dependency Injection container for PHP

image

samburns/dirty-needle

Dependency Injection container for PHP

  • Sunday, April 26, 2015
  • by Sam-Burns
  • Repository
  • 1 Watchers
  • 2 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status Scrutinizer Code Quality, (*1)

dirty-needle

Introduction

Dependency Injection container for PHP, (*2)

Set up a config file which returns a PHP array, like this:, (*3)

<?php
return array(
    'dirty-needle' => array(
        '@dependency' => array(
            'class' => '\Dependency'
        ),
        '@class-with-dependency' => array(
            'class' => '\ClassWithDependency',
            'arguments' => array(
                '@dependency'
            )
        ),
    ),
);

Then get stuff out of your container, like this:, (*4)

$diContainer = \DirtyNeedle\DiContainer()::getInstance();
$diContainer->addConfigFile('/path/to/config.php');
$classWithDependency = $diContainer->get('class-with-dependency');

You can also do inject mock objects:, (*5)

$diContainer->set('service-id', $mockObject);

Reseting definitions and mocks:, (*6)

$diContainer->reset();

Releases are available supporting PHP5.3-5.6, with the 5.6-compatible releases being significantly faster in their implementation., (*7)

Versioning

The project uses semantic versioning., (*8)

The Versions

26/04 2015

dev-master

9999999-dev

Dependency Injection container for PHP

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires

26/04 2015

dev-service-id-value-object

dev-service-id-value-object

Dependency Injection container for PHP

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires

15/03 2015

3.0.3

3.0.3.0

Dependency Injection container for PHP

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires

15/03 2015

3.0.2

3.0.2.0

Dependency Injection container for PHP

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires

15/03 2015

3.0.0

3.0.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.4.0

 

The Development Requires

11/03 2015

1.2.1

1.2.1.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.4.0

 

The Development Requires

11/03 2015

0.2.1

0.2.1.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.3.0

 

The Development Requires

10/03 2015

2.2.0

2.2.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.6.0

 

The Development Requires

10/03 2015

0.2.0

0.2.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.3.0

 

The Development Requires

10/03 2015

1.2.0

1.2.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.4.0

 

The Development Requires

08/03 2015

0.1.0

0.1.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.3.0

 

The Development Requires

08/03 2015

2.1.0

2.1.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.6.0

 

The Development Requires

08/03 2015

1.1.0

1.1.0.0

Dependency Injection container for PHP

  Sources   Download

The Requires

  • php >= 5.4.0

 

The Development Requires