Skip to content

A small Composite Container for use with the Delegate Lookup pattern.

License

Notifications You must be signed in to change notification settings

ultra-lite/composite-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Scrutinizer Code Quality Latest Stable Version MIT Licence

logo 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