strident / phimple
简单的依赖注入容器,受 Pimple 启发。
2.0.3
2015-02-10 15:51 UTC
Requires
- php: >=5.4
Requires (Dev)
- codeclimate/php-test-reporter: ~0.1
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2024-09-24 02:34:58 UTC
README
Phimple是一个非常轻量级的依赖注入容器,深受Pimple的启发。
##安装
Phimple可以作为Composer包使用。您可以通过运行以下命令将其包含在项目中:
$ composer require strident/phimple ~2.0
##使用
Phimple(就像Pimple一样)非常容易上手。
use Phimple\Container; $container = new Container();
Phimple在内部某些方面与Pimple有所不同,API也有所不同。API的改变是我决定开发Phimple的主要原因。有两个概念;服务和参数。