Re: [Template] Design issues
| From: | Alan Knowles | Date: | Sat, 12 Jun 2004 04:58:28 +0000 |
| Subject: | Re: [Template] Design issues | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30536@lists.php.net to get a copy of this message | ||
I'm going to check the code into CVS under pear/Template
- The package should be voted on prior to release (if by anychance it get voted down.. - I guess it leaves pear.cvs..)
If anyone objects shout now..
The concept is to
package Template:
Template.php
Template/Error.php
Template/Assign.php
Template/Block.php
Template/Plugin.php
Template/Plugin/Standard.php (basic savant plugins.)
Template/Plugin/Formater.php (provider
for :numformat, :date :... etc.)
Template/Element.php
package Template_Compiler
Template/Compiler.php
Template/Compiler/Flexy.php
Template/Compiler/Flexy/Token/*
Template/Compiler/Flexy/Tokenizer.php
Template/Compiler/Flexy/Translator.php
Template/Compiler/Flexy/Tag.php
Template/Compiler/Flexy/Tag/Flexy.php
Template/Compiler/Xipe
Template/Compiler/Xipe/Basic.php .......(filters)
Template/Compiler/Regex
Template/Compiler/Regex/Email.php .......(filters)
... maybe one day..
Template/Compiler/Smarty
Template/Compiler/Smarty/*(filters...)
Template/Compiler/WACT ....
....
However - these may as well reside in the same CVS tree to start with.. - break them apart if it get voted in.....
Regards
Alan
Paul M Jones wrote:
On Jun 11, 2004, at 9:54 PM, Alan Knowles wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comFair enough.Two more points: output() and toString() might take two optional params: first for the template, second for the $data object/array.I'm not too keen to combine this as at Present.. - It needs alot more thought.. - perhaps add it as a TODO/CONSIDER note above the output method..Understood, I figured a good balance between one step (construct) and three steps (construct, open, output) might be two steps. ;-) Any, it would be nice to get the code into PEAR CVS ASAP so we can start the collaboration in earnest. Thanks. :-)This would obviate the outputData() method, and make the two-step open()/ouput() process a one-stepper.It could be done in one step: $ret = Template_AutoRun::construct(array('template_dir' => '....' 'auto_run' => array( 'template' => 'xxxxx', 'data' => 'yyyy' );but there's a balance to be found, a) an API that doesnt have too many methods; b) methods that avoid too many arguments.