Skip to content
Di component from Zend Framework
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src Merge branch 'hotfix/50' Jan 10, 2019
templates Fix style for autoloader class Oct 19, 2018
test
.coveralls.yml
.gitattributes
.gitignore
.travis.yml Invoke coveralls with php Dec 15, 2017
CHANGELOG.md Bump next maintenance version Jan 15, 2019
LICENSE.md
README.md Updated coverage badge in README.md Nov 17, 2017
composer.json
composer.lock Implement requested changes Sep 13, 2018
mkdocs.yml Updates site description in MkDocs configuration Nov 23, 2018
phpcs.xml
phpunit.xml.dist Renames test suite to match repo name Nov 14, 2017

README.md

zend-di

Build Status Coverage Status

zend-di provides autowiring 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 such as zend-servicemanager.

You can’t perform that action at this time.