Re: static object access

From: Date: Mon, 27 Jan 2003 09:54:53 +0000
Subject: Re: static object access
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-628@lists.php.net to get a copy of this message
I have already thought about that, too. But I'm not sure if you really need it. Most time you could easily assign a real object to the template and call it's methods. I have some classes with static methods but for now I haven't had to call them from within my templates. Static method calls work exactly the same as plugin functions. Normal calls behave a bit different because they depend on the values of the current object. So there's a reason for supporting object method calls. But I don't see one for static calls. On the other hand if you include real OOP support in Smarty you have to make static method call possible. André "Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag news:1043438783.9329.15.camel@lena.ispi.prv... > Do we need to support this? > > {if foobar::is_empty($foo)} > ... > {/if} > > I noticed we had a template with this in it, and the old Smarty > supported it, mostly on accident because it just passed the syntax > through to PHP. The new parser stops and gives an error. > > Monte >

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