chomenko / auto-install
Service auto install for Nette Framework
Installs: 620
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:extensions
Requires
- php: >=7.2
- doctrine/annotations: ^1.6
- nette/caching: ^2.5
- nette/di: ^2.4
- nette/robot-loader: >=2.4
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 { }