Smarty - the compiling PHP template engine | ||
---|---|---|
Prev | Chapter 16. Extending Smarty With Plugins 利用插件扩展smarty | Next |
Output filter plugins operate on a template's output, after the
template is loaded and executed, but before the output is displayed.
输出过滤器插件的作用是,在装载并执行完一个模板之后显示模板之前,操作该模板的输出。
The first parameter to the output filter function is the template
output that needs to be processed, and the second parameter is the
instance of Smarty invoking the plugin. The plugin is supposed to do
the processing and return the results.
输出过滤器函数第一个参数是需要处理的模板输出,第二个参数是调用这个插件的Smarty实例。此插件将会对参数进行处理并返回相应的结果。