<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><th colspan="3" align="center">Smarty - the compiling PHP template engine</th></tr><tr><td width="25%" align="left" valign="bottom"><a href="plugins.naming.conventions.html" accesskey="P">Prev</a></td><td width="50%" align="center" valign="bottom">Chapter 16. Extending Smarty With Plugins</td><td width="25%" align="right" valign="bottom"><a href="plugins.functions.html" accesskey="N">Next</a></td></tr></table> # Writing Plugins[編寫插件] Plugins can be either loaded by Smarty automatically from the filesystem or they can be registered at runtime via one of the register_* API functions. They can also be unregistered by using unregister_* API functions. For the plugins that are registered at runtime, the name of the plugin function(s) does not have to follow the naming convention. If a plugin depends on some functionality provided by another plugin (as is the case with some plugins bundled with Smarty), then the proper way to load the needed plugin is this: Smarty既可自動從文件系統加載插件,也可在運行時通過register_* API函數注冊插件。當然,也可以通過unregister_* API函數卸載已經載入的插件。 對于只在運行時注冊的插件函數不必遵守命名約定。 如果某個插件依賴其它插件的某些功能(事實上,一些插件被綁定在Smarty中),那么可以通過如下方法加載需要的插件: | ~~~ <?phprequire_once $smarty->_get_plugin_filepath('function', 'html_options');?> ~~~ | |-----| As a general rule, Smarty object is always passed to the plugins as the last parameter with two exceptions: modifiers do not get passed the Smarty object at all. blocks get passed $repeat after the Smarty object to keep backwards compatibility to older versions of Smarty. 按照慣例,Smarty對象通常作為最后一個參數傳遞給插件,但有兩個例外: 調節器不須接受Smarty對象的傳遞。 為了向前兼容舊版Smarty,[塊插件](#)將$repeat排在Smarty對象后面作為最后一個參數($smarty作為倒數第二個參數)。 <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="plugins.naming.conventions.html" accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="plugins.functions.html" accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Naming Conventions <br/> 命名約定</td><td width="34%" align="center" valign="top"><a href="plugins.html" accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Template Functions 模板函數</td></tr></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>

                              哎呀哎呀视频在线观看