Re: HTML_Template Interface recommendation

From: Date: Wed, 12 May 2004 00:55:39 +0000
Subject: Re: HTML_Template Interface recommendation
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29130@lists.php.net to get a copy of this message
Not a bad start, I think you realize that like the database abstraction layers, you begin to loose the advantages of each engine, by abstracting them down. flexy's setData, should probably do if ($data === null) { $this->_templateData = $name; } output should probably do: $elements = isset($this->_templateData->element) ?
      $this->_templateData->element : array();
$this->outputObject($this->_templateData, $elements); toString can use outputObjectBuffered().. i dont mind adding this interface flexy if you can get some level of agreement with the other engines.. :) Regards Alan Philippe Jausions wrote:
Alexey Borzov wrote:
Hi! Philippe Jausions wrote:
My point was that currently the template packages available on PEAR (and Smarty) are not easily interchangeable. If you want to use an instance of a template engine in an application, then you are bound to it. In my view, this is not acceptable, almost just as bad as mixing PHP and HTML codes.
Have you read this stuff for starters? http://wact.sourceforge.net/index.php/TemplateView If yes, then please try to define the interface that can be used by both HTML_Template_PHPLIB and HTML_Template_Flexy. Come back with a working implementation of that.
Please check: http://www.11abacus.com/dev/pear/HTML_Template_Interface.phps it should give you a good idea of what I'm looking into. -Philippe
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

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