plumbus/injectable

具有特性的Plumbus注入

0.1.1 2016-05-10 12:03 UTC

This package is auto-updated.

Last update: 2024-09-17 09:33:57 UTC


README

通过php traits实现依赖注入

使用use SomeComponentTrait;来包含组件。对于要包含的组件,需要使用use InjectableComponentTrait; - 这样组件将获得getInstance()方法,并且其实例将存储在\Plumbus\Injectable\InjectableComponent类的$instances属性中。

更多信息请参阅作者提供的文档 https://docs.google.com/document/d/1ujkxg0OtwfpuPYG2atvhC9eWev06jjho5_He17JgdlU/edit?usp=sharing 支持页面 https://plumbusteam.ru/component/plumbus/injectable