The dependency injection container

v0.7.5 2024-11-06 10:07 UTC

README

Dependency Injection (DI) is a lightweight PHP library for dependency injection for stateful application.

Features

  • Zero configuration. Ability to inject dependencies without modifying the code in the dependent class.
  • Constructor injection
  • Support for the concept of environment/scope for dependency lookup
  • Injection of dependencies into properties
  • Injecting configuration values as a Dependency
  • Lazy loading
  • Support php-attributes for describing dependencies

Installation

You can install Dependency Injector using Composer. Run the following command:

composer require ifcastle/di

Architecture

Architecture