Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
/ zend-di Public archive
forked from tux-rampage/zend-di

PHP 5.6 compatible backport of zend-di 3

License

Notifications You must be signed in to change notification settings

lukanetconsult/zend-di

 
 

Repository files navigation

zend-di

Master: Build Status Develop: Build Status

This Fork

This fork is there to provide PHP 5.6 support. If you are not able to adopt PHP 7.1 yet (which you should to asap), you can use this to get ready for zend-di 3.x.

When you are ready for php 7.1, you can seamlessly switch to the official zend-di.

Install via composer:

composer config repositories.lukadi vcs https://github.com/lukanetconsult/zend-di.git
composer install luka/zend-di

Switch to official zend-di:

composer config --unset repo.lukadi
composer remove luka/zend-di
composer require zendframework/zend-di

About

Zend\Di provides auto wiring to implement Inversion of Control (IoC) containers. IoC containers are widely used to create object instances that have all dependencies resolved and injected. Dependency Injection containers are one form of IoC – but not the only form.

Zend\Di is designed to be simple, fast and reusable. It provides the following features:

  • Constructor injection
  • Autowiring:
    • Recursively through all dependencies
    • With configured type preferences
    • with configured injections
    • With injections passed in the create() call
  • Code generators to create factories usable by other IoC containers like Zend\ServiceManager

It does not provide:

  • Setter, interface, property or any other injection method than constructor injection
  • Support for factories
  • Declaring shared/unshared instances
    • the injector always creates new instances
    • the default container always shares instances
  • Support for variadic arguments in __construct

If you need these features combine it with another IoC container like Zend\ServiceManager.

About

PHP 5.6 compatible backport of zend-di 3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%