Tag filter concept

瀏覽次數:6 次
跳到第一則未讀訊息

Alexander Obuhovich

未讀,
2012年12月5日 上午8:46:372012/12/5
收件者:Development In-Portal
I was looking at Twig template parser, used in Symfony, recently and found interesting filter approach used in there.

In Twig filter is after-processing applied to tag result. Basically all our:
  • escaping
  • comparing
  • tab removal
is done there as filters. However that concept goes far beyond that - each Twig plugin can define it's own filter, that can be used with ANY OTHER tag from any other module.

Also it's easily provides ability add block tags per module.


I also recommend digging deeper into Twig code to find more ways to organize cross-module communication, e.g. shared tags, shared events.

Dmitry A.

未讀,
2012年12月24日 凌晨1:07:232012/12/24
收件者:in-por...@googlegroups.com
Hi Alex,


Thank you for your research and report on this.

I do agree we should continue reviewing this since it can bring more benefits to our parser too.


DA
回覆所有人
回覆作者
轉寄
0 則新訊息