我可以通过"工具">"模板管理器"编辑PHP类模板,然后编辑"PHP类">"编辑".我的项目框架支持使用命名空间自动加载,所以我想在创建新的"PHP类"时自动将命名空间添加到文件的顶部.我怎样才能做到这一点?
作为一方,我怎样才能找出模板中可用的变量?
我记得编辑默认类模板导致了一些问题,我最终根据我的需要创建了新的类模板。您可以通过选择现有的类文件并从上下文菜单中运行“另存为模板”来完成此操作
至于可用变量:
Variable Name Description
name contains the name of the file that is being created
user contains the user name
nameAndExt contains the name and extension of the file that is being created
date contains text representing the current day like 23. 3. 2007
time contains text the current time like 17:18:30
encoding the file encoding of the template instance
Run Code Online (Sandbox Code Playgroud)
有用的参考:
http://blogs.oracle.com/netbeansphp/entry/how_to_manage_templates_in
http://blogs.oracle.com/netbeansphp/entry/how_to_manage_templates_in1
| 归档时间: |
|
| 查看次数: |
3482 次 |
| 最近记录: |