Re: [SMARTY] Pre-, post-, and output filters
| From: | Andrei Zmievski | Date: | Tue, 16 Apr 2002 15:45:08 +0000 |
| Subject: | Re: [SMARTY] Pre-, post-, and output filters | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3770@lists.php.net to get a copy of this message | ||
On Tue, 16 Apr 2002, Ivo Jansch wrote:
> Hi,
>
> Andrei Zmievski wrote:
>
> >Thoughts?
>
> I think the load_filter method is a good one.
>
> Perhaps you can also make the $type param optional, so calling
> load_filter without any parameter will load every available filter (so
> people currently relying on the automatic behaviour don't have to bother
> filling the autoload_filters.
I've been thinking more about this and I would actually like to require
specifying filter name when loading it. You wouldn't be able to load all
filters at once. Why? For one, it removes a lot of technical complexity
in the code, and also, when we have multiple plugin directories it will
improve performance since Smarty won't have to scan directories for
filters. So, you would have to say:
$smarty->load_filter('output', 'trim');
$smarty->load_filter('prefilter', 'stamp');
Of course, the $smarty->autoload_filters variable would still work.
Are there any objections to this?
-Andrei
* My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/
*