用于维护模块化 Zend Framework 2 应用程序的实用模块。
Repository abandoned 2019-12-05
This repository is no longer maintained. Tooling was not updated to work with ZF3, and with the transition to Laminas, we will be deciding what, if any, new tooling we want to provide for the MVC framework.
ZFTool is an utility module for maintaining modular Zend Framework 2 applications. It runs from the command line and can be installed as ZF2 module or as PHAR (see below).
composer require zendframework/zftool:dev-mastervendor/bin/zf.php as reported belowzftool.phar with one of the options reported below (zftool.phar replace the zf.php)You can also generate the zftool.phar using the bin/create-phar command as reported below
zf.php modules [list] show loaded modules
zf.php version | --version display current Zend Framework versionzf.php diag [options] [module name]
[module name] (Optional) name of module to test
-v --verbose Display detailed information.
-b --break Stop testing on first failure.
-q --quiet Do not display any output unless an error occurs.
--debug Display raw debug info from tests.zf.php create project
The path of the project to be createdzf.php create module []
The name of the module to be created
The path to the root folder of the ZF2 application (optional)zf.php create controller []
The name of the controller to be created
The module in which the controller should be created
The root path of a ZF2 application where to create the controllerzf.php create action []
The name of the action to be created
The name of the controller in which the action should be created
The module containing the controller
The root path of a ZF2 application where to create the actionzf.php config list list all configuration option
zf.php config get display a single config value, i.e. "config get db.host"
zf.php config set set a single config value (use only to change scalar values)zf.php classmap generate [--append|-a] [--overwrite|-w]
The directory to scan for PHP classes (use "." to use current directory)
File name for generated class map file or - for standard output. If not supplied, defaults to
autoload_classmap.php inside .
--append | -a Append to classmap file if it exists
--overwrite | -w Whether or not to overwrite existing classmap filezf.php install zf []
The directory where to install the ZF2 library
The version to install, if not specified uses the last availableYou can create a .phar file containing the ZFTool project. In order to compile ZFTool in a .phar file you need to execute the following command:
bin/create-pharThis command will create a zftool.phar file in the bin folder. You can use and ship only this file to execute all the ZFTool functionalities. After the zftool.phar creation, we suggest to add the folder bin of ZFTool in your PATH environment. In this way you can execute the zftool.phar script wherever you are, for instance executing the command:
mv zftool.phar /usr/local/bin/zftool.pharNote: If the above fails due to permissions, run the mv line again with sudo.
暂无开放 Issues,或尚未同步最近议题。