Re: [Template] Design issues

From: Date: Sat, 12 Jun 2004 04:22:12 +0000
Subject: Re: [Template] Design issues
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30535@lists.php.net to get a copy of this message
On Jun 11, 2004, at 9:54 PM, Alan Knowles wrote:
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..
Fair enough.
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.
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. :-) -- Paul M. Jones Savant: the simple alternative to Smarty for PHP. http://phpsavant.com/ DB_Table: build RDBMS tables and XHTML forms in one PHP class. http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table Yawiki: your collaborative online documentation system. http://yawiki.com/ Yawp: a single-file foundation for PHP applications. http://phpyawp.com/

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