Re: HTMP Template Proposal

From: Date: Thu, 22 Mar 2007 16:45:15 +0000
Subject: Re: HTMP Template Proposal
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45977@lists.php.net to get a copy of this message
Took 299 seconds to process 192,233 rows of data on a MacBook Core 2 Duo 2GHz, 1GB DDR2 PHP 4.4.4. on line 153 you should add: $oldKey = ''; to avoid a warning. regards, Igor. On 3/22/07, David Coallier <davidc@php.net> wrote:
I"m gonna put that under some stress tests and load tests today. However I must admit that the simplicity of the file makes me like it. Looks very clean so far, I'll just make couple of tests and get back to you on this one ;-) Thanks, On 3/22/07, Joachim.werner@diggin-data.de <Joachim.werner@diggin-data.de> wrote: Sorry, the link is wrong. Please use http://www.diggin-data.de/wiki/static/PhpPearHTML_Template_DD.html Best Regards, Joachim Werner
Hello, I was looking for a PHP replacement for the php_template extension. The extension is able to parse a nested array in one go. I have written a PEAR class to do this. Usage example: Template file 'page.tpl.htm': <h1>{title}</h1> <table> <tmpl:contacts> <tr>
    <td>{name}</td>
    <td>{firstname}</td>
</tr></tmpl:contacts> </table> // Set up data array for the page $data = array( 'title' => 'Contacts List', 'contacts' => array(
    array('name' => 'Doe', 'firstname' => 'John',
    array('name' => 'Smith', 'firstname' => 'Jane'
) ); // Create an instance of HTML_Template_DD $oTpl = new HTML_Template_DD( ); // Set the template file $res = $oTpl->getTplFile( 'page.tpl.htm' ); // Parse the template $oTpl->parse( $data ); $oTpl->show(); The class has ca. 280 lines of code. I wonder if this is worth proposing as a PEAR class? More infos and download here: https://www.diggin-data.de/wiki/wiki/run.php?iRequest=wiki/ViewPage&iPage=PhpPearHTML_Template_DD Thanks in advance, -- Joachim Werner Wiesbaden, Germany -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18 -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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