<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                <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.load.filter.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.registerplugin.html">Next</a></td> </tr></tbody></table> # registerFilter()[注冊過濾器] Name registerFilter() ― dynamically register filters 動態注冊過濾器 Description void registerFilter(string type, mixed callback); Use this to dynamically register filters to operate on a templates. 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為類中的方法。 <table width="80%" border="0" cellpadding="2" cellspacing="2" class="note"><caption> 技術提示 </caption> <tr><td>Technical Note<br/> If the chosen function callback is of the form array(&amp;$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. <br/> 如果選擇array(&amp;$object, $method)格式的回調函數,帶相同方法($method)的相同類,只能注冊一個實例。在這種情況下將使用最后注冊的回調函數。</td> </tr></table> 譯注 | 預過濾器(Prefilters)、后過濾器(Postfilters)和輸出過濾器(Output Fiters)都可以使用本方法注冊。 | |-----| A prefilter runs through the template source before it gets compiled. See template prefilters for more information on how to setup a prefiltering function. A postfilter runs through the template code after it was compiled to PHP. See template postfilters for more information on how to setup a postfiltering function. A outputfilter operates on a template's output before it is displayed. See template output filters for more information on how to set up an output filter function. See also unregisterFilter(), loadFilter(), $autoload_filters, template pre filters template post filters template output filters section. 預過濾器在模板資源被編譯之前運行。查看[模板預過濾器](#)獲取更多關于怎么設置預過濾器函數的信息。 發送過濾器在模板被編譯為php之后運行。查看[模板發送過濾器](#)獲取更多關于怎么設置發送過濾器函數的信息。 輸出過濾器在模板輸出未顯示之前運行。查看[模板輸出過濾器](#)獲取更多關于怎么設置輸出過濾器函數的信息。 參見[unregisterFilter()](#)、[loadFilter()](#)、[$autoload_filters](#)、[模板預過濾器](#)、[模板發送過濾器](#)、[模板輸出過濾器](#)章節。 <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.load.filter.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.registerplugin.html">Next</a></td> </tr><tr><td valign="top" align="left" width="33%">loadFilter()<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%">registerPlugin()<br/> 注冊插件</td> </tr></tbody></table>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看