projek-xyz/container
最新稳定版本:v1.0.1
Composer 安装命令:
composer require projek-xyz/container
包简介
a dead-simple PSR-11 psr/container implementation with flexible service registration
README 文档
README
Simple yet Flexible PSR-11 Container Implementation
This tiny library aims to provide a dead-simple PSR-11 implementation with flexible service registration.
Features
- PSR-11 Compliant: Fully implements the PSR-11
ContainerInterface. - Autowiring: Automatically resolves dependencies for constructors and callables using type-hints or parameter names.
- Flexible Registration: Register services using closures, class names, instances, or even class-method pairs.
- Service Extension: Easily modify or wrap existing services using the
extend()method. - On-the-fly Resolution: Create instances without adding them to the container stack using
make(). - Container Awareness: Automatically inject the container into services that implement
ContainerAware. - Lightweight: Zero dependencies (other than PSR-11 interface) and a small footprint.
Installation
Use Composer
$ composer require projek-xyz/container --prefer-dist
Documentation
Documentations and usages available on wiki
License
This library is open-sourced software licensed under MIT license.
统计信息
- 总下载量: 829
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-12