工具 phalcon-devtools
生成项目
phalcon create-project
帮助信息
phalcon project --help
Phalcon DevTools (3.0.0)
Help:帮助
Creates a project 创建项目
Usage:用法
project [name] [type] [directory] [enable-webtools]
Arguments: 参数
help Shows this help text 显示此帮助信息
Example 例子
phalcon project store simple
Options: 选项
--name Name of the new project 新项目的名字
--enable-webtools Determines if webtools should be enabled [optional] 此选项决定了新的项目中是否使用webtools开发辅助组件
--directory=s Base path on which project will be created [optional] 在何外创建项目
--type=s Type of the application to be generated (cli, micro, simple, modules) 应用的种类(微型,简单,多模块,console等)
--template-path=s Specify a template path [optional] 指定模板路径
--use-config-ini Use a ini file as configuration file [optional] 使用ini文件作为配置保存文件
--trace Shows the trace of the framework in case of exception. [optional] 出错时是否显示框架的trace信息
--help Shows this help 显示帮助
生成控制器
phalcon create-controller --name test
生成模型
phalcon model --name tablename
Options:
--name=s Table name 表名
--schema=s Name of the schema. [optional] schema名
--namespace=s Model’s namespace [optional] 模型命名空间
--get-set Attributes will be protected and have setters/getters. [optional] 设置字段访问属性为私有 并添加setters/getters方法
--extends=s Model extends the class name supplied [optional] 指定扩展类名
--excludefields=l
Excludes fields defined in a comma separated list [optional]
--doc Helps to improve code completion on IDEs [optional] 辅助IDE的自动完成功能
--directory=s Base path on which project will be created [optional] 项目的根目录
--force Rewrite the model. [optional] 重写模型
--trace Shows the trace of the framework in case of exception. [optional] 出错时显示框架trace信息
--mapcolumn Get some code for map columns. [optional] 生成字映射的代码
--abstract Abstract Model [optional] 抽象模型
生成CURD
phalcon scaffold --table-name products
PHPSTORM配置VOLT