someniatko / composite-container

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:MIT License


Languages

Language:PHP 100.0%