Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

closures as output filters

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
SlowFox
Smarty Regular


Joined: 02 Oct 2006
Posts: 55

PostPosted: Thu Aug 16, 2018 9:02 pm    Post subject: closures as output filters Reply with quote

[deleted]

Last edited by SlowFox on Wed Aug 22, 2018 7:25 am; edited 1 time in total
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Aug 17, 2018 10:05 am    Post subject: Reply with quote

Do you really NEED output filtering? I'm curious.
Back to top
View user's profile Send private message
SlowFox
Smarty Regular


Joined: 02 Oct 2006
Posts: 55

PostPosted: Wed Aug 22, 2018 7:29 am    Post subject: Reply with quote

AnrDaemon wrote:
Do you really NEED output filtering? I'm curious.

Of course there are different approaches for everything, so I don't need it.

But it seemed to be quite elegant: I use Smarty for pretty much everything, in this case CSV files. Adjusting the encoding per output filter and passing it via a closure was fitting in really well.

However, I did not realize that output filters are processed during compile time which makes my approach impossible. Bad luck, reverted it already.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Aug 22, 2018 7:33 am    Post subject: Reply with quote

Smile Was made same mistake, when learning Smarty.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP