Naming Conventions 命名约定

Plugin files and functions must follow a very specific naming convention in order to be located by Smarty.

插件文件和函数必须遵循特定的命名约定以便Smarty识别。

The plugin files must be named as follows:

插件文件必须命名如下:

type.name.php

 

Where type is one of these plugin types:

 

其中type是如下插件中的一种:

  • function
  • modifier
  • block
  • compiler
  • prefilter
  • postfilter
  • outputfilter
  • resource
  • insert

 

And name should be a valid identifier (letters, numbers, and underscores only).

name为仅包含字母、数字和下划线的合法标志符。

Some examples例如: function.html_select_date.php, resource.db.php, modifier.spacify.php.

The plugin functions inside the plugin files must be named as follows:

插件内的函数应遵循如下命名约定:

smarty_type_name()

 

The meanings of type and name are the same as before.

typename的意义如前。

Smarty will output appropriate error messages if the plugin file it needs is not found, or if the file or the plugin function are named improperly.

如果指定的插件文件不存在或命名不合规范,Smarty会输出相应的错误信息。

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值