Re: [PHPTAL] Extending namespace
I will add them to my product soon. Thanks, 2011/6/12 Kornel Lesiński : > On Fri, 10 Jun 2011 05:01:08 +0100, Hisateru Tanaka > wrote: > >> I'm trying to extend namespace of PHPTAL to use in my framework. >> 3 new attributes would introduced. >> >> pal:content-nl2br >> pal:replace-nl2br >> pal:attr >> >> They might be things which some users wanted... >> >> Test code is here: >> https://gist.github.com/1016531 >> Someone tell me which this implementation is even good or not. > > Yes, it's good. > >> If developer team is planning to change class tree or public/protected >> method, how can I keep compatibility safer? > > I don't see anything you could improve for future-compatibility. > > I do plan to rewrite code generation someday, but until then you're safe :) > > -- > regards, Kornel Lesiński > > ___ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal > -- Hisateru Tanaka ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] Extending namespace
On Fri, 10 Jun 2011 05:01:08 +0100, Hisateru Tanaka wrote: I'm trying to extend namespace of PHPTAL to use in my framework. 3 new attributes would introduced. pal:content-nl2br pal:replace-nl2br pal:attr They might be things which some users wanted... Test code is here: https://gist.github.com/1016531 Someone tell me which this implementation is even good or not. Yes, it's good. If developer team is planning to change class tree or public/protected method, how can I keep compatibility safer? I don't see anything you could improve for future-compatibility. I do plan to rewrite code generation someday, but until then you're safe :) -- regards, Kornel Lesiński ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Extending namespace
Thanks, However I've known this post: http://lists.motion-twin.com/pipermail/phptal/2009-September/001855.html According to this way, "structure" keyword is necessary at every time. tal:content="structure toHTML:var" ...seems bit complex. Our designers might not accept so unnatural things. We have many free text fields including newline. When "line 1\nline 2" is given, I want these two results: pal:content-nl2br="var" ==> line 1line 2 pal:content-nl2br="structure var" ==> line 1line 2 This is most consistent answer, I thought. > Why not just have tal:content="nl2br: var" > > Just define phptal_tales_nl2br() and voila :) -- Hisateru Tanaka ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] Extending namespace
Why not just have tal:content="nl2br: var" Just define phptal_tales_nl2br() and voila :) On Jun 10, 2011 12:03 PM, "Hisateru Tanaka" wrote: > Hi, > > I'm trying to extend namespace of PHPTAL to use in my framework. > 3 new attributes would introduced. > > pal:content-nl2br > pal:replace-nl2br > pal:attr > > They might be things which some users wanted... > > Test code is here: > https://gist.github.com/1016531 > Someone tell me which this implementation is even good or not. > > If developer team is planning to change class tree or public/protected > method, how can I keep compatibility safer? > > -- > Hisateru Tanaka > > ___ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Extending namespace
Hi, I'm trying to extend namespace of PHPTAL to use in my framework. 3 new attributes would introduced. pal:content-nl2br pal:replace-nl2br pal:attr They might be things which some users wanted... Test code is here: https://gist.github.com/1016531 Someone tell me which this implementation is even good or not. If developer team is planning to change class tree or public/protected method, how can I keep compatibility safer? -- Hisateru Tanaka ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal