minetro/service-autoloader

此包已被弃用且不再维护。作者建议使用 contributte/di 包。

Nette 框架的服务自动加载器

dev-master 2021-06-25 18:02 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:59:30 UTC


README

68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77 68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534

网站 🚀 contributte.org | 联系 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

免责声明

⚠️ 此项目不再维护。请使用 contributte/di
Composer minetro/service-autoloader
版本
PHP
许可证

使用方法

extensions:
	autoload: Minetro\Autoloader\DI\ServiceAutoloadExtension

默认

此配置默认启用。

autoload:
	dirs:
		- %appDir%

	annotations:
		- @Service

	interfaces:
		- Minetro\Autoloader\AutoloadService

	decorator:
		inject: off

自定义

您可以覆盖所有您想要覆盖的配置设置。

autoload:
	dirs:
		- %appDir%
		- %libsDir%
		- %fooDir%

	annotations:
		- @Service
		- @MyCustomService

	interfaces:
		- Minetro\Autoloader\AutoloadService
		- App\Model\MyAutoloadServiceInterface

	decorator:
		inject: on / off

性能

服务加载仅在依赖注入容器编译时触发一次。应该相当快,几乎和官方注册presenter为服务一样快。

开发

此包由以下作者维护。

538058?v=3&s=80

请考虑支持 contributte 开发团队。也感谢您使用此包。