?
Ce document utilise Manuel du site Web PHP chinois Libérer
Smarty - the compiling PHP template engine | ||
---|---|---|
Prev 來源:PHP中文社區(qū) | Chapter 15. Advanced Features | Next |
后過濾器
Template postfilters are PHP functions that your templates are ran through after they are compiled. Postfilters can be either registered or loaded from the plugins directory by using load_filter() function or by setting $autoload_filters variable. Smarty will pass the compiled template code as the first argument, and expect the function to return the result of the processing.
模板后過濾器是一些PHP函數(shù),模板就是在那些函數(shù)編譯后才運行。后過濾器同樣能夠通過 load filter() 函數(shù)和設置 $autoload filters 變量來注冊或者從工具目錄里載入。SMARTY將傳遞模板輸出作為第一個參數(shù),通過自定義函數(shù)返回處理結果。
?
Example 15-3. using a template postfilter
|
Prev | Home | Next |
Prefilters | Up | Output Filters |