stepapo/generator
最新稳定版本:0.1.7
Composer 安装命令:
composer require stepapo/generator
包简介
Library that generates empty Nette Presenters, Components and Services with basic structure and Nextras ORM model files.
README 文档
README
Tool for generating empty Nette Presenters, Components and Nextras ORM model files with basic structure.
Usage
Presenter
$options = getopt(null, ['appNamespace:', 'appDir:', 'name:', 'module:']); $generator = new Stepapo\Generator\Generator( appNamespace: $options['appNamespace'] ?? 'App', appDir: __DIR__ . '/../' . ($options['appDir'] ?? 'app'), ); $generator->createPresenter( name: $options['name'], module: $options['module'] ?? null, );
Component
$options = getopt(null, ['appNamespace:', 'appDir:', 'name:', 'module:', 'type:', 'entityName:', 'withTemplateName:']); $generator = new Stepapo\Generator\Generator( appNamespace: $options['appNamespace'] ?? 'App', appDir: __DIR__ . '/../' . ($options['appDir'] ?? 'app'), ); $generator->createComponent( name: $options['name'], module: $options['module'] ?? null, entityName: $options['entityName'] ?? null, withTemplateName: $options['withTemplateName'] ?? false, type: $options['type'] ?? null, );
Model
$options = getopt(null, ['appNamespace:', 'appDir:', 'name:', 'module:', 'withConventions:']); $generator = new Stepapo\Generator\Generator( appNamespace: $options['appNamespace'] ?? 'App', appDir: __DIR__ . '/../' . ($options['appDir'] ?? 'app'), ); $generator->createModel( name: $options['name'], module: $options['module'] ?? null, withConventions: $options['withConventions'] ?? false, );
Service
$options = getopt(null, ['appNamespace:', 'appDir:', 'name:', 'module:']); $generator = new Stepapo\Generator\Generator( appNamespace: $options['appNamespace'] ?? 'App', appDir: __DIR__ . '/../' . ($options['appDir'] ?? 'app'), ); $generator->createService( name: $options['name'], module: $options['module'] ?? null, );
Command
$options = getopt(null, ['appNamespace:', 'appDir:', 'name:', 'module:']); $generator = new Stepapo\Generator\Generator( appNamespace: $options['appNamespace'] ?? 'App', appDir: __DIR__ . '/../' . ($options['appDir'] ?? 'app'), ); $generator->createCommand( name: $options['name'], module: $options['module'] ?? null, );
统计信息
- 总下载量: 136
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-14