https://github.com/webchemistry/service-attribute
https://github.com/webchemistry/service-attribute
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/webchemistry/service-attribute
- Owner: WebChemistry
- Created: 2020-12-22T12:38:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-02T13:14:53.000Z (11 months ago)
- Last Synced: 2025-04-19T18:53:41.141Z (3 months ago)
- Language: PHP
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Nette service generator
```php
from(__DIR__ . '/app');// decorators
echo "\e[36mDecorators\e[39m\n";$decorators = DecoratorFinder::findDecorators($directory);
DecoratorValidator::validate($decorators);
$neon = new NeonFile($path = __DIR__ . '/app/generated/decorators.neon', (new DecoratorNeonGenerator($decorators))->generate());
$neon->diff();
$neon->save();echo sprintf("File generated from %d decorators: file://%s\n", count($decorators), $path);
// services
echo "\e[36mServices\e[39m\n";
$services = ServiceFinder::findServices($directory);$neon = new NeonFile($path = __DIR__ . '/app/generated/services.neon', (new ServiceNeonGenerator($services))->generate());
$neon->diff();
$neon->save();echo sprintf("File generated from %d services: file://%s\n", count($services), $path);
```run:
```bash
php services.php
```