4h / generatorbundle
代码生成包,扩展了 symfony 的标准 sensio 生成包。
Requires
- php: >=5.3.0
- sensio/generator-bundle: *
This package is not auto-updated.
Last update: 2024-10-02 10:36:04 UTC
README
这是一个扩展 symfony sensio 生成包的包。
您可以使用此生成包生成三件事情,它通过命令行像 sensio 生成包一样工作。
- 要创建消费者,运行此命令
php app/console generate:consumer --no-interaction --bundleName=[bundleName] --consumerName=[consumerName]
示例
consumer --no-interaction --bundleName=QuoteWriteBundle --consumerName=Quote
- 要创建控制器,运行此命令
php app/console generate:RESTcontroller --no-interaction --controller=bundleName:controllerName --type=type --action=getall --fields="fields"
示例
php app/console generate:RESTcontroller --no-interaction --controller=QuoteWriteBundle:Quote --type=write --action=putevent --fields="guid:string tenderGuid:string author:string price:float "
- 要创建文档,运行此命令
php app/console generate:doctrine:document --no-interaction --document=bundleName:documentName --fields="fields" --format=yml
示例
php app/console generate:doctrine:document --no-interaction --document=QuoteWriteBundle:Quote --fields="guid:string tenderGuid:string author:string price:float " --format=yml