Re: New thread - Template base class design

From: Date: Fri, 11 Jun 2004 02:46:07 +0000
Subject: Re: New thread - Template base class design
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30462@lists.php.net to get a copy of this message
Greg Beaver wrote:
$tpl = &$tpl->create('savant'); // or $morecontrol = new Template_Foo; $morecontrol->doSomethingSpecialForFoo(); // initialize a new template from an existing sub-template $tpl = &$tpl->create($morecontrol); // etc. ?>
Damn, that's a cool design. Just for reference, I also created a Savant-like [very simple] template awhile ago called "Capsule". Based loosely on the API for the Velocity Texen engine; it provided the layer separation I needed and was written in PHP5. This was a very lightweight class, and while I think that everyone in this discussion has much more elegant solutions, I figured I'd post a link in the offchance that it did something different or added ideas: http://phing.info/Capsule.phps (sorry, my server doesn't syntax highlight) Geat job to Paul & Alan; I think this collaboration is awesome. I look forward to replacing that piece-of-crap Capsule with the end result. :) Hans

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