PHP-Smarty模板引擎-翻译-手册-第15章高级特性-输出过滤器
2010-03-24 23:34
369 查看
PHP-Smarty模板引擎-翻译-手册-第15章高级特性-输出过滤器
Output
Filters
输出过滤器
When the template is invoked via display()or fetch()
, its
output can be sent through one or more output filters. This differs from
postfilters
because postfilters operate on compiled templates
before they are saved to the disk, whereas output filters operate on the
template output when it is executed.
通过display()
或fetch()
执行模板时,输出
可以被发送到一个或多个输出过滤器,与postfilters
不
同,postfilters在已编译的模板保存在硬盘前处理,而输出过滤器在模板执行后处理输出。
Output filters
can be either registered
or loaded from the plugins
directory
by using the load_filter()
method or by setting the $autoload_filters
variable. Smarty will pass the template output as the first argument,
and expect the function to return the result of the processing.
输出
过滤器可以通过注册
,
也可以使用load_filter()
方
法或设置$autoload_filters
变
量从plugins
directory
中加载。Smarty将把模板输出传递为第一个参数,然后获取函数处理后的结果。
Example 15-4. Using a template outputfilter 例 15-4. 使用模板输出过滤器
|
,
load_filter()
,
$autoload_filters
,
postfilters
and $plugins_dir
.
参考 register_outpurfilter()
,
load_filter()
,
$autoload_filters
,
postfilters
and $plugins_dir
.
[PHP
- Smarty模板引擎 - Manual手册 - Chapter 15. Advanced Features第15章高级特性 -
Output Filters输出过滤器]
http://www.smarty.net/manual/en/advanced.features.outputfilters.phpPHP - Smarty 模板引擎 - Blog
[PHP - Smarty模板引擎 -
官方网站]
http://www.smarty.net/
[PHP - Smarty模板引擎 - 下载地址]
当前版本 2.6.25, http://www.smarty.net/do_download.php?download_file=Smarty-2.6.25.tar.gz
全部列表, http://smarty.php.net/download.php
[PHP -
Smarty模板引擎 - 相关论坛]
http://php.board.newsmth.net/http://forum.csdn.net/SList/PHP/
http://www.phpinsider.com/smarty-forum/
http://news.php.net/php.smarty.general
http://news.php.net/php.smarty.dev
http://news.php.net/php.smarty.cvs
[PHP - Smarty模板引擎 - 关键词]
smarty[PHP - Smarty模板引擎 - Manual手册 - Chapter 3. Basic Syntax第3章
基础语法]
[9]翻译, Comments注释, http://smarty.php.net/manual/en/language.basic.syntax.php#language.syntax.comments [4]
Math 数学运算, http://smarty.php.net/manual/en/language.math.php [7]
[PHP - Smarty模板引擎 - Manual手册 - Chapter 5. Variable
Modifiers第5章 变量修饰符]
cat将值连接到给定变量之后, http://smarty.php.net/manual/en/language.modifier.cat.php[6]
escape转义修饰
符, http://smarty.php.net/manual/en/language.modifier.escape.php[10] upper将字符串转换
成大写字母, http://smarty.php.net/manual/en/language.modifier.upper.php[4]
[PHP - Smarty模板引擎 - Manual手册 - Chapter 7. Built-in
Functions第7章 内建函数]
{config_load}用于从一个配置文件加载配置变量到模板中, http://www.smarty.net/manual/en/language.builtin.functions.php
{foreach},
{foreachelse}用于像访问序数数组一样访问关联数组, http://smarty.php.net/manual/en/language.function.foreach.php [8]
{strip}在显示之
前删除每行前后多余的空格和回车字符, http://smarty.php.net/manual/en/language.function.strip.php[1]
[PHP - Smarty模板引擎 - Manual手册 - Chapter 8. Custom
Functions第8章 自定义函数]
{assign}用于在模板执行过程中设置模板变量, http://smarty.php.net/manual/en/language.custom.functions.php#language.function.assign
{counter}
计数器, http://smarty.php.net/manual/en/language.custom.functions.php
借助cycle实现循环输出
值, http://smarty.php.net/manual/en/language.function.cycle.php [25]
[PHP - Smarty模板引擎 - Manual手册 - Chapter 12.
Smarty Class Variables第十二章Smarty类变量]
$plugins_dir插件文件夹,http://smarty.net/manual/en/variable.plugins.dir.php[35]
[PHP - Smarty模板引擎 - Manual手册 - 第13章 Smarty类方法]
assign_by_ref()按引用赋值, http://smarty.php.net/manual/en/api.assign.by.ref.php [16]
register_function()
动态注册模板函数插件, http://smarty.php.net/manual/en/api.register.function.php [26]
[PHP
- Smarty 模板引擎 - 翻译 - Manual手册 - Chapter 15. Advanced Features第15章 高级特性]
OutputFilters输出过滤器, http://www.smarty.net/manual/en/advanced.features.outputfilters.php [27]
相关文章推荐
- PHP-Smarty模板引擎-翻译-手册-第15章高级特性-输出过滤器
- PHP - Smarty模板引擎 - Manual手册 - 翻译中 - 第13章 Smarty类方法 - register_function()动态注册模板函数插件
- PHP - Smarty模板引擎 - 翻译 - Manual手册 - Chapter 3. Basic Syntax第3章 基础语法 - Comments注释
- php对象的高级特性
- 实例简介PHP的一些高级面向对象编程的特性
- 《PHP对象、模式与实践》之高级特性
- PHP学习系列之PHP高级OOP特性
- [Php]php手册的翻译
- PHP 学习笔记(四):高级教程:Cookies,Sessions,邮件,错误处理,异常处理,过滤器
- PHP - Smarty模板引擎 - Manual手册 - Chapter 7. Built-in Functions第7章 内建函数 - {config_load}用于从一个配置文件加载配置变量到模板中
- PHP - Smarty模板引擎 - Manual手册 - 中文版 - Chapter 8. Custom Functions第8章自定义函数 - {assign}用于在模板执行过程中设置模板变量
- [翻译][php扩展开发和嵌入式]第20章-php的高级嵌入式
- PHP 安全手册 第五条 输出转义 最好的MYSQL 转义函数 mysql_real_escape_string
- PHP手册翻译日记[4]
- 用路由系统生成输出URL 在视图中生成输出URL 高级路由特性 精通ASP-NET-MVC-5-弗瑞曼
- PHP手册翻译日记[5] chm 手册(附下载地址)
- PHP ADODB 1.99版手册中文翻译
- 关于《Java2核心技术 卷二:高级特性的 (V1.3)5E》的翻译
- PHP高级特性技术介绍
- 深入PHP面向对象、模式与实践——高级特性(3)