我是Zend Framework的新手,也是Zend工具的新手。
我有两个关于 Zend工具的问题。
有没有人有任何关于Zend工具中所有命令的详细列表的链接?我似乎无法找到任何东西?
例如:如果我想使用该工具在我的模块目录中创建控制器而不是控制器目录 - 如何使用该工具执行此操作?我试着做以下但是没有用:
在我的“命令提示符”中,我导航到我正在工作的站点,然后导航到模块目录;从那里,我试图为该目录创建一个控制器,即:
c:\theproject\application\modules\forms\controllers>zf create controller enquiry action products module forms
ZF提供了以下错误消息:命令行上留下了未知参数:module
但是,当我尝试在没有左边的参数的情况下创建控制器时,ZF在controllers目录中创建了控制器。
第二次
我想使用Zend工具删除已经创建的页面。我似乎无法找到Zend工具命令。
第三
我想创建一个普通的页面视图。即page.phtml
我似乎找不到关于如何创建普通页面的命令,还要指定它将进入的目录。
答案 0 :(得分:2)
模块
表格
布局
将对DBAdapter
DbTable
注意:有专业,使用zf create db-table。得到具体的 它们。
ProjectProvider
创建项目提供商名称操作
:\ XAMPP \ htdocs中\ ZendFramework \外消旋>
答案 1 :(得分:0)
从项目的根目录中键入zf
您将获得它拥有的命令列表。像
这样的东西Zend Framework Command Line Console Tool v1.11.11
Usage:
zf [--global-opts] action-name [--action-opts] provider-name [--provider-opts] [provider parameters ...]
Note: You may use "?" in any place of the above usage string to ask for more specific help information.
Example: "zf ? version" will list all available actions for the version provider.
Providers and their actions:
Version
zf show version mode[=mini] name-included[=1]
Note: There are specialties, use zf show version.? to get specific help on them.
Config
zf create config
zf show config
zf enable config
Note: There are specialties, use zf enable config.? to get specific help on them.
zf disable config
Note: There are specialties, use zf disable config.? to get specific help on them.
Phpinfo
zf show phpinfo
Manifest
zf show manifest
Profile
zf show profile
Project
zf create project path name-of-profile file-of-profile
zf show project
Note: There are specialties, use zf show project.? to get specific help on them.
Application
zf change application.class-name-prefix class-name-prefix
Model
zf create model name module
View
zf create view controller-name action-name-or-simple-name module
Controller
zf create controller name index-action-included[=1] module
Action
zf create action name controller-name[=Index] view-included[=1] module
Module
zf create module name
Form
zf enable form module
zf create form name module
Layout
zf enable layout
zf disable layout
DbAdapter
zf configure db-adapter dsn section-name[=production]
DbTable
zf create db-table name actual-table-name module force-overwrite
Note: There are specialties, use zf create db-table.? to get specific help on them.
ProjectProvider
zf create project-provider name actions
然后尝试使用zf --help
命令获取有关命令的更多帮助
在modules目录中创建控制器的命令是
zf create controller <Controllername> 1 <module-name>
并且可以在示例项目上尝试更多。