百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Z

ZFTool

> 编程语言
开源

用于维护模块化 Zend Framework 2 应用程序的实用模块。

183 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于维护模块化 Zend Framework 2 应用程序的实用模块。

Zend Framework 2 Tool

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).

Features

  • Class-map generator
  • Listing of loaded modules
  • Create a new project (install the ZF2 skeleton application)
  • Create a new module
  • Create a new controller
  • Create a new action in a controller
  • Application diagnostics

Requirements

  • Zend Framework 2.0.0 or later.
  • PHP 5.3.3 or later.
  • Console access to the application being maintained (shell, command prompt)

Installation using Composer

  1. Open console (command prompt)
  2. Go to your application's directory.
  3. Run composer require zendframework/zftool:dev-master
  4. Execute the vendor/bin/zf.php as reported below

Using the PHAR file (zftool.phar)

  1. Download the zftool.phar from packages.zendframework.com
  2. Execute the zftool.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

Usage

Basic information

zf.php modules [list]           show loaded modules
zf.php version | --version      display current Zend Framework version

Diagnostics

zf.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.

Project creation

zf.php create project 

              The path of the project to be created

Module creation

zf.php create module  []

              The name of the module to be created
              The path to the root folder of the ZF2 application (optional)

Controller creation:

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 controller

Action creation:

zf.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 action

Application configuration

zf.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)

Classmap generator

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 file

ZF library installation

zf.php install zf  []

              The directory where to install the ZF2 library
           The version to install, if not specified uses the last available

Compile the PHAR file

You 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-phar

This 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.phar

Note: If the above fails due to permissions, run the mv line again with sudo.

Todo

  • Module maintenance (installation, configuration, removal etc.) [installation DONE]
  • Inspection of application configuration. [DONE]
  • Deploying zf2 skeleton applications. [DONE]
  • Reading and writing app configuration. [DONE]

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言