||$source, |
    | |
    $template_);|

    string $source;;

    |string smartypostfilter_name(|$compiled, |
    | |
    $template_);|

    ;object $template;


    Example 18.7. 前置过滤器


    Example 18.8. 后置过滤器

    1. <?php
    2. /*
    3. * Smarty plugin
    4. * -------------------------------------------------------------
    5. * File: postfilter.post01.php
    6. * Name: post01
    7. * Purpose: 列出当前模板的变量
    8. * -------------------------------------------------------------
    9. */
    10. function smarty_postfilter_post01($compiled, Smarty_Internal_Template $template)
    11. $compiled = "<pre>\n<?php print_r(\$template->getTemplateVars()); ?>\n</pre>" . $compiled;
    12. return $compiled;
    13. }
    14. ?>
    15.