Re: Re[2]: Passing in objects by reference (Pull approach w/ Smarty)

From: Date: Fri, 06 Jul 2001 08:10:26 +0000
Subject: Re: Re[2]: Passing in objects by reference (Pull approach w/ Smarty)
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1122@lists.php.net to get a copy of this message
On Thu, 5 Jul 2001 18:44:40 -0400, Oleg Rekutin <uksi@uksiland.com> wrote: >Would it then be possible for Smarty to support calling object >methods? I have made a modification on my local copy of smarty 1.4.3. Which allows me to use the phplib SQL class from within a smarty template. Or actually an RecordSet type of class will do. It works transparently with the section loop tags. So a template section like: {section name=sec_obj loop=$obj} {$obj[sec_obj].name} {/section} gets parsed into: for(true;$obj->nr();true): echo $obj->f("name"); endfor; This change also automatically supports. {$obj.name} which also gts translated into: echo $obj->f("name"); Where nr and f are configurable. Maybe this could help you. Regards Adi

« previous php.smarty.general (#1122) next »