ultra-lite / composite-container
1.0.2
2021-03-10 12:23 UTC
Requires
- php: ^7.0 || ^8.0
- psr/container: ^1.1
Requires (Dev)
- phpspec/phpspec: ^5 || ^7
This package is not auto-updated.
Last update: 2024-11-14 05:55:35 UTC
README
Ultra-Lite Composite Container
This is an extremely lightweight Composite Container for use with the Delegate Lookup pattern. It is PSR-11 compliant.
Use it with the Ultra-Lite Container or any other Delegate Lookup containers.
Use
$compositeContainer = new \UltraLite\CompositeContainer\CompositeContainer(); $compositeContainer->addContainer($container); $container->setDelegateContainer($compositeContainer); // or appropriate method on Delegate Lookup container if ($compositeContainer->has($serviceId) { $compositeContainer->get($serviceId); }
Installation
composer require ultra-lite/composite-container