Re: [SMARTY-DEV] object registration committed

From: Date: Fri, 24 Jan 2003 15:09:06 +0000
Subject: Re: [SMARTY-DEV] object registration committed
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-615@lists.php.net to get a copy of this message
Object registration now follows this format in CVS: index.php --------- $smarty->register_object('foo', $myobj); // smarty arg format $smarty->register_object('foo', $myobj, false); // one param per arg index.tpl --------- {foo->bar p1="foo" p2="bar"} If the given name does not exist as a method, it will be treated as a property. If a method and property exist of the same name, the method will be used. Monte > > I agree with this. Using '->' for objects makes it easier to see which is > which and might even make things easier to explain to the template designer. > For instance an methode of an object can take params and an array can't. The > difference might be hard to explain > Example: > {$object.Methode p1=2 p2=23} works > {$array.Element p1=1 p2=23} doesn't work (or not as expected ;-) ) > > Greetings, > Jan Rosier > > The best way to predict your future is to create it. -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#615) next »