Name
registerFilter() 鈥 娉ㄥ唽杩囨护鍣
璇存槑
void聽registerFilter(string聽type,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽mixed聽callback);娉ㄥ唽杩囨护鍣ㄣ 鍙傛暟濡備笅锛
typedefines the type of the filter. Valid values are "pre", "post", "output" and "variable".-
callbackdefines the PHP callback. it can be either:A string containing the function
nameAn array of the form
array(&$object, $method)with&$objectbeing a reference to an object and$methodbeing a string containing the method-nameAn array of the form
array($class, $method)with$classbeing the class name and$methodbeing a method of the class.
Technical Note
If the chosen function callback is of the form
array(&$object, $method), only one instance of the
same class and with the same $method can be registered. The
latest registered function callback will be used in
such a scenario.
prefilter鍓嶇疆杩囨护鍣紝鍦ㄦā鏉跨紪璇戜箣鍓嶆墽琛岀殑杩囨护鍣ㄣ 璇︽儏鍙傝鍓嶇疆杩囨护鍣銆
postfilter鍚庣疆杩囨护鍣紝鍦ㄦā鏉跨紪璇戞垚PHP鍚庢墽琛岀殑杩囨护鍣ㄣ 璇︽儏鍙傝鍚庣疆杩囨护鍣銆
outputfilter杈撳嚭杩囨护鍣紝鍦ㄦā鏉垮皢瑕displayed鍓嶆墽琛岀殑杩囨护鍣ㄣ 璇︽儏鍙傝杈撳嚭杩囨护鍣銆
鍙傝
unregisterFilter(),
loadFilter(),
$autoload_filters,
鍓嶇疆杩囨护鍣
鍚庣疆杩囨护鍣
杈撳嚭杩囨护鍣銆
