chomenko/auto-install

此包的最新版本(v2.1.1)没有可用的许可证信息。

Nette 框架的自动安装服务

安装: 615

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:扩展

v2.1.1 2019-03-11 13:55 UTC

This package is auto-updated.

Last update: 2024-09-12 04:22:51 UTC


README

安装

composer require chomenko/auto-install

配置

autoInstall:
	dirs:
	  - %rootDir%/app
extensions:
    autoInstall: Chomenko\AutoInstall\AutoInstallExtension

使用

use Chomenko\AutoInstall\AutoInstall;

class MyService implements AutoInstall
{

}

使用哪个工厂

搜索以 I 为前缀的类

use Chomenko\AutoInstall\AutoInstall;

class MyService implements AutoInstall
{
	
}

interface IMyService
{
	/**
	 * @return MyService
	 */
	public function create();
}

添加服务标签

use Chomenko\AutoInstall\Config;
use Chomenko\AutoInstall\AutoInstall;


/**
 * @Config\Tag({"My.tag", "My.nextag"})
 */
class MyService implements AutoInstall
{
	
}

设置服务实现

use Chomenko\AutoInstall\Config;
use Chomenko\AutoInstall\AutoInstall;


/**
 * @Config\Implement("App\IMyService")
 */
class MyService implements AutoInstall
{
	
}