chomenko/auto-install

There is no license information available for the latest version (v2.1.1) of this package.

Service auto install for Nette Framework

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

This package is auto-updated.

Last update: 2024-11-12 04:40:11 UTC


README

Install

composer require chomenko/auto-install

Configuration

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

Use

use Chomenko\AutoInstall\AutoInstall;

class MyService implements AutoInstall
{

}

Use witch factory

Search class with prefix I

use Chomenko\AutoInstall\AutoInstall;

class MyService implements AutoInstall
{
	
}

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

Add service tag

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


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

Set service implement

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


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