1.1.0 2014-04-22 11:48 UTC

This package is not auto-updated.

Last update: 2024-09-28 15:43:41 UTC


README

Build Status Scrutinizer Code Quality HHVM Status Latest Stable Version License

Puice

受Guice和这两个Google谈话启发的依赖项和配置管理框架

基准测试

https://github.com/alwinmark/benchmarking-dependency-injection-containers(目前仅实现了基准测试1)

安装

安装php5-curl

  • 在debian/ubuntu上:sudo apt-get install php5-curl

要安装Puice,请在您的composer.json中添加以下内容:"alwinmark/Puice": "*"

例如

{
    "require": {
        "alwinmark/puice": "1.0.0"
    },
    "require-dev": {
        "behat/behat": "2.4.*@stable",
        "behat/mink-extension": "*",
        "behat/mink-selenium2-driver": "*",
        "behat/mink-goutte-driver": "*",
        "phpspec/phpspec": "2.0.*@dev"
    },
    "minimum-stability": "dev",
    "config": {
        "bin-dir": "vendor/bin/"
    },
    "autoload": {"psr-0": {"": "src"}}
}

如何使用

如果您想了解如何使用它,请查看功能文件

也许您已经有了某种配置/注入框架,您只想使用Puice提供的通用工厂。如果是这种情况,您必须编写一些粘合代码,实现Puice\Config接口,并将其传递给工厂。

许可证

MIT