Dhii - DI
A simple, granular, standards-compliant dependency injection container and factory implementation.
Features
- Complies with container-interop v1.1 specification.
- Mostly supports the proposed service-provider v0.3 standard.
- Includes the delegate lookup feature, a.k.a. composite containers, with intuitive override order.
- Uses some other standards published separately.
- Granular approach, with an implementation agnostic of concrete behaviour published separately: rely on this re-usable, tested, standards-compliant functionality to make your own container implementation.
ContainerInterface#get()guaranteed to return same instance every time.FactoryInterface#make()guaranteed to return new instance every time.
Disadvantages
- Does not support the factories' 2nd parameter, i.e.
$getPrevious. - Container and factory unified into one class (to be separated soon).