germania-kg/psrcontainerfactory
Composer 安装命令:
composer require germania-kg/psrcontainerfactory
包简介
Factory callable that creates and returns a Pimple PSR-11 Container
README 文档
README
Installation with Composer
$ composer require germania-kg/psrcontainerfactory
The PsrContainerFactory works with both Pimple DIC or PHP-DI. One of these must be installed. – N.B. that Pimple has aged and PHP-DI has evolved becoming kind of the DI library standard.
$ composer require php-di/php-di $ composer require pimple/pimple
Usage
The callable accepts arrays, StdClass objects and other instances of ContainerInterface.
<?php use Germania\PsrContainerFactory\PsrContainerFactory; use Psr\Container\ContainerInterface; $psr11 = (new PsrContainerFactory)([ 'foo' => 'bar' ]); // yay! echo ($psr_11 instanceOf ContainerInterface) ? "yay!" : "noe?";
Issues
Roadmap
Fill in planned or desired features
Development
$ git clone https://github.com/GermaniaKG/psrcontainerfactory.git
$ cd psrcontainerfactory
$ composer install
Unit tests
Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:
$ composer test # or $ vendor/bin/phpunit
统计信息
- 总下载量: 75
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-15