phmlabs/init
最新稳定版本:2.0.0
Composer 安装命令:
composer require phmlabs/init
包简介
phmLabs component for initializing class using a yaml file / array
README 文档
README
This library is a very lightweight dependency injection container. The special thing about Init is that it uses names parameters and fits perfectly with yaml files this way.
class MyClass { public function __construct($firstParam, $secondParam = null) { // ... } } $options = [ 'class' => 'MyClass', 'call' => [ '__construct' => ['secondParam' => 'foo', 'firstParam' => 'bar'] ] ] $myClass = Init::initialize($options);
统计信息
- 总下载量: 13.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-27