dmitrivereshchagin/yii2-psr-container

PSR-11 container adapter for Yii 2

v1.0.0 2017-03-14 21:02 UTC

This package is not auto-updated.

Last update: 2024-11-23 20:59:05 UTC


README

PSR-11 container adapter for Yii 2.

Install

% composer require dmitrivereshchagin/yii2-psr-container

Usage

\Yii::$container->setSingleton(
    'Psr\Container\ContainerInterface',
    function ($container) {
        return new \yii\psr\container\ContainerAdapter($container);
    }
);

Testing

% composer test