Smarty - the compiling PHP template engine | ||
---|---|---|
上一篇教材 宏博CMS网站内容管理系统 收集整理 | Chapter 15. Advanced Features | 下一篇教材 |
后过滤器
Template postfilters are PHP functions that your templates are ran through after they are compiled. Postfilters can be either registered or loaded from the plugins directory by using load_filter() function or by setting $autoload_filters variable. Smarty will pass the compiled template code as the first argument, and expect the function to return the result of the processing.
模板后过滤器是一些PHP函数,模板就是在那些函数编译后才运行。后过滤器同样能够通过 load filter() 函数和设置 $autoload filters 变量来注册或者从工具目录里载入。SMARTY将传递模板输出作为第一个参数,通过自定义函数返回处理结果。
上一篇教材 | Smarty中文手册的主目录 | 下一篇教材 |
Prefilters | Smarty章节目录 | Output Filters |