library di
Dependency injection container with PSR-11 and container-interop/service-provider support
bnf/di
Dependency injection container with PSR-11 and container-interop/service-provider support
- Tuesday, March 13, 2018
- by bnf
- Repository
- 1 Watchers
- 0 Stars
- 23 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 15 % Grown
PSR-11+ Dependency Injection Container
, (*1)
Provides PSR-11 and
container-interop/service-provider support., (*2)
Installation
$ composer require bnf/di:~0.1.0
Usage
<?php
require 'vendor/autoload.php';
use Bnf\Di\Container;
use Psr\Container\ContainerInterface;
use Interop\Container\ServiceProviderInterface;
$container = new Container([new class implements ServiceProviderInterface {
public function getFactories(): array
{
return [
stdClass::class => function (ContainerInterface $container): stdClass {
return new stdClass;
}
];
}
public function getExtensions(): array
{
return [];
}
}]);
$class = $container->get(stdClass::class);
var_dump($class);
dev-master
9999999-dev
Dependency injection container with PSR-11 and container-interop/service-provider support
Sources
Download
GPL-2.0+
The Requires
The Development Requires
psr-11
service-provider
0.1.2
0.1.2.0
Dependency injection container with PSR-11 and container-interop/service-provider support
Sources
Download
GPL-2.0+
The Requires
The Development Requires
psr-11
service-provider
0.1.1
0.1.1.0
Dependency injection container with PSR-11 and container-interop/service-provider support
Sources
Download
GPL-2.0+
The Requires
The Development Requires
psr-11
service-provider
0.1.0
0.1.0.0
Dependency injection container with PSR-11 and container-interop/service-provider support
Sources
Download
GPL-2.0+
The Requires
The Development Requires
psr-11
service-provider