enlitepro / zf2-scaffold
v1.1.0
2014-03-28 14:55 UTC
Requires
- symfony/console: >=2.0.7
- zendframework/zend-code: >=2.3.0
- zendframework/zend-stdlib: >=2.3.0
Requires (Dev)
- phpunit/phpunit: ~3.7
- satooshi/php-coveralls: dev-master
- zendframework/zend-mvc: >=2.2.1
This package is not auto-updated.
Last update: 2024-09-23 14:44:16 UTC
README
安装
推荐的安装方式是通过 composer。
{ "require-dev": { "enlitepro/zf2-scaffold": "~1.0.0" } }
使用
./vendor/bin/scaffold
Available commands:
controller Generate controller
entity Generate entity
exception Generate exceptions (RuntimeException, NotFoundException and other)
form Generate form factory and write to service.config.php
full Generate all available (without module skeleton)
module Generate module skeleton
options Generate options, options DI trait, options factory and write to service.config.php
repository Generate repository and repository DI trait
service Generate service, service DI trait, service factory, service test and write to service.config.php
./vendor/bin/scaffold service [--no-service] [--no-trait] [--no-factory]
[--no-test] [--only-service] [--only-trait]
[--only-factory] [--only-test] <module> <name>
<module> Name of module
<name> Name of service
--no-service Disable service generation
--no-trait Disable service trait generation
--no-factory Disable service factory generation
--no-test Disable service test generation
--only-service Generate only service
--only-trait Generate only trait
--only-factory Generate only factory
--only-test Generate only test
./vendor/bin/scaffold options [--no-options] [--no-trait] [--no-factory]
[--only-options] [--only-trait] [--only-factory] <module> <name>
<module> Name of module
<name> Options name (will be append Options postfix)
--no-options Disable options generation
--no-trait Disable trait generation
--no-factory Disable factory generation
--only-options Generate only options
--only-trait Generate only trait
--only-factory Generate only factory
创建裸模块
如果您想创建独立的模块,可以使用 --bare
选项,该选项将创建以下文件夹结构
config/
src/
ModuleName/
Module.php
test/
phpunit.xml