Re: HTMP Template Proposal

From: Date: Thu, 22 Mar 2007 13:13:47 +0000
Subject: Re: HTMP Template Proposal
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45968@lists.php.net to get a copy of this message
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

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