Re: an HTML_Template_IT[X] fork is available

From: Date: Tue, 11 Feb 2003 16:32:41 +0000
Subject: Re: an HTML_Template_IT[X] fork is available
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13111@lists.php.net to get a copy of this message
Now I have read your Changes and I am not willing to support this changes, if they are committed in one pack. > HTML_Template_IT > > 1) New features and improvements: > a) Transparent caching of prepared templates. You just have to pass a second > parameter to the constructor: a directory name (the directory should be > writable for PHP). After the template gets parsed for blocks and > variables, the resultant arrays are serialized and saved into files in > this directory. The next time the template file needs to be loaded, the > prepared one is loaded instead, with a cheap unserialize() instead of > very expensive RegExp matching logic. Why not use PEAR::CacheLite and cache the Template class within ones program? Why do we need a caching inside IT? IT is simple, if I want a more advanced and blown template engine I use Smarty. > b) Global variables. Variables set by a function setGlobalVariable() do > not get cleared after first substitution, unlike ordinary ones, and do > not trigger "block not empty" logic (block with only global variables is > still considered "empty"). Can be used for directory prefixes, session > identifiers and the stuff like that. This one is nice > c) hideBlock(): an opposite of touchBlock(). It prevents block from > appearing in the result even if it is "not empty". Nice too > d) The source was cleaned, PEARified and optimised. Inline docs were updated Sounds good > 2) Removed features and incompatibilities: > a) $flagCacheTemplatefile and related logic was dropped in favor of a more > generic approach, see (1.a) > > b) $clearCache and $clearCacheOnParse were removed (now the engine works as > if they are always false) > > c) Public functions init() and free() are removed, they were unusable > unless called from setTemplate() anyway... Don't know these things. > d) Using <!-- INCLUDE something --> in template is no more possible. If one > needs unconditional include, he should consider joining the templates > into single file, if one needs something more useful, he should use ITX > with its addBlockfile() method. I _really_ _need_ this feature (I added it). Its really important to me, without it, I couldn't use IT anymore, so a clear -1 on this. If you are not able to provide a patch for 1b) and 1c) against current CVS you get a clear -1 from me! Christian Dickmann

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