Depend:更少的配置,更多的注入

时间:2021-06-25 11:32:09
【文件属性】:
文件名称:Depend:更少的配置,更多的注入
文件大小:212KB
文件格式:ZIP
更新时间:2021-06-25 11:32:09
PHP 依靠 更少的配置,更多的注入 介绍 Depend 试图通过尽可能多地自动化流程来使开发人员更简单、更容易地利用 IOC。 唯一的编码要求是您的依赖项在您正在编写的类的构造函数中明确定义。 例如; /* * Good */ class ClassA { function __construct ( ClassC $ c , ClassD $ d , ClassF $ f ) { } } /* * Bad */ class ClassA { function __construct ( $ c , $ d , $ f ) { } } 要求 该项目已设置为兼容 PHP 5.3.3 且对 Composer 友好。 安装 将"codeblanche/entity": "1.*"到项目 composer.json 文件的require部
【文件预览】:
Depend-master
----.gitignore(46B)
----src()
--------Depend()
----bootstrap.php(49B)
----LICENSE(1KB)
----public()
--------coverage()
--------index.php(6KB)
----composer.json(623B)
----README.md(8KB)
----tests()
--------bootstrap.php(744B)
--------phpunit.xml(987B)
--------Depend()
--------runtests.sh(62B)
----fixtures()
--------ClassB.php(984B)
--------ClassCircularRefB.php(184B)
--------ClassA.php(2KB)
--------ClassTwo.php(69B)
--------ClassStub.php(67B)
--------ClassXA.php(42B)
--------ClassOne.php(333B)
--------ClassF.php(1KB)
--------InterfaceTwo.php(73B)
--------ClassE.php(406B)
--------ClassCircularRefA.php(184B)
--------ClassD.php(393B)
--------InterfaceThree.php(40B)
--------ClassNoInstance.php(113B)
--------InterfaceOne.php(156B)
--------ClassC.php(1KB)

网友评论