horat1us/yii2-di-bootstrap
Composer 安装命令:
composer require horat1us/yii2-di-bootstrap
包简介
Yii2 DI Container Bootstrap
README 文档
README
This package provides abstract bootstrap for Yii2 dependency injection container. It have to be extended in packages with specifying available for configuration dependencies.
Main purpose of this package to prevent invalid container configuration.
Installation
Using packagist.org:
composer require horat1us/yii2-di-bootstrap:^1.1
Usage
Implement DI Bootstrap in your package
<?php namespace Package; use Horat1us\Yii\DI; class Bootstrap extends DI\Bootstrap { public function getDefinitions() : array{ return [ Package\ConfigInterface::class => Package\Config::class, ]; } }
Append package Bootstrap to your application configuration
<?php // config.php use Package; return [ 'bootstrap' => [ 'package' => [ 'class' => Package\Bootstrap::class, 'definitions' => [ // here you can reconfigure config interface // note: another class names can not be configured here ], ], ], // ... another application configuration ];
License
统计信息
- 总下载量: 1.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-21