Re: Play nice! Re: Savant/Flexy/Foo template engines

From: Date: Thu, 10 Jun 2004 20:50:27 +0000
Subject: Re: Play nice! Re: Savant/Flexy/Foo template engines
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30430@lists.php.net to get a copy of this message
I've been crazy busy at work for the last couple days so i haven't had a time to review the code but i would point out that an interface and extension isn't the only solution. What you need is a decent api and the ability to support lots of features without lots of overhead over or a really complicated api. Using other patterns then just an interface and inheiritance may be a better way to go. -josh Paul M Jones wrote:
On Jun 10, 2004, at 11:06 AM, Paul M Jones wrote:
There Are no extended classes!!!??? - the only reasons to extend it are to write BC wrappers.. ?
Well, yes -- I thought that was the point. Minimalist base, wrappers for specialized functionality. Maybe I'm not getting it; I thought that was the agreed procedure, in reference to the Jausions template outline.
In deference to Alan, and in attempting to adhere more closely to Jausions, I have made these changes: * All properties are public now. * Added a compiler option to the minimalist Jausions interface; not sure it will satisfy Alan, though. In short, if you want a compiler, you can build any kind you like -- just set $tpl->compiler =& $my_compiler_object, and openTemplate() will call its compile() method. The compile() method takes one param, the source template, and returns one value, the file-path or stream of the script to be executed (not in stone, can change that to be more flexible as we like). * Removed $output property, toString() now checks vars and refs for conflicting output names. * Alan says the $mime property is not needed, but I don't see how the getMimeType() return value is going to be generated -- the template may generate PDF, plain text, XHTML, or anything else, so shouldn't openTemplate() method set this? See the new version at... http://wiki.ciaweb.net/yawiki/index.php?area=Savant&page=TemplateSource


« previous php.pear.dev (#30430) next »