<table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Header navigation table"><tbody><tr><th align="center" colspan="3">Smarty - the compiling PHPtemplate engine</th> </tr><tr><td valign="bottom" align="left" width="25%"><a accesskey="P" href="api.template.exists.html">Prev</a></td> <td valign="bottom" align="center" width="50%">Chapter 13. Smarty Class Methods()</td> <td valign="bottom" align="right" width="25%"><a accesskey="N" href="api.unregisterplugin.html">Next</a></td> </tr></tbody></table> # unregisterFilter()[注销过滤器] Name unregisterFilter() ― dynamically unregister a filter 动态注销一个过滤器 Description void unregisterFilter(string type,mixed callback); Use this to dynamically unregister filters. It uses the following parameters: type defines the type of the filter. Valid values are "pre", "post", "output" and "variable". callback defines the PHP callback. it can be either: 1.A string containing the function name 2.An array of the form array(&$object, $method) with &$object being a reference to an object and $method being a string containing the method-name 3.An array of the form array($class, $method) with $class being the class name and $method being a method of the class. 本函数在模板中动态地注销过滤器。其参数如下: “type”定义过滤器的类型,其值为下列之一:“pre”、“post”、“output”和“variable”; “callback”为定义的php回调函数,其类型为下列之一: 1、包含函数名的字符串; 2、格式为(&$object, $method)的数组,其中,&$object为引用对象,$method为包含方法名的字符串; 3、格式为($class, $method)的数组,其中,$class为类名,$method为类中的方法。 参见[registerFilter()](#)。 <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Footer navigation table"><tbody><tr><td valign="top" align="left" width="33%"><a accesskey="P" href="api.template.exists.html">Prev</a></td> <td valign="top" align="center" width="34%"><a accesskey="H" href="index.html">Home</a></td> <td valign="top" align="right" width="33%"><a accesskey="N" href="api.unregisterplugin.html">Next</a></td> </tr><tr><td valign="top" align="left" width="33%">templateExists()<br/> 模板是否存在<br/></td> <td valign="top" align="center" width="34%"><a accesskey="U" href="api.functions.html">Up</a></td> <td valign="top" align="right" width="33%">unregisterPlugin()<br/> 注销插件</td> </tr></tbody></table>