|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
SlowFox Smarty Regular
Joined: 02 Oct 2006 Posts: 55
|
Posted: Thu Aug 16, 2018 9:02 pm Post subject: closures as output filters |
|
|
[deleted]
Last edited by SlowFox on Wed Aug 22, 2018 7:25 am; edited 1 time in total |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Aug 17, 2018 10:05 am Post subject: |
|
|
Do you really NEED output filtering? I'm curious. |
|
Back to top |
|
SlowFox Smarty Regular
Joined: 02 Oct 2006 Posts: 55
|
Posted: Wed Aug 22, 2018 7:29 am Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Aug 22, 2018 7:33 am Post subject: |
|
|
Was made same mistake, when learning Smarty. |
|
Back to top |
|
|
|
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
|