Re: [SMARTY] class & objekt's
| From: | messju mohr | Date: | Sun, 06 Apr 2003 09:31:26 +0000 |
| Subject: | Re: [SMARTY] class & objekt's | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9142@lists.php.net to get a copy of this message | ||
On Mon, Apr 07, 2003 at 03:39:52AM +0200, Sascha Willecke wrote:
> Hi,
>
> I have read this on the smarty website:
>
> [11-February-2003] Another point release. Added support for dynamic object
> reference syntax ($foo->$bar), support for full variable syntax within
> quotes ("$foo[0].bar"), and other minor fixes.
>
> does this mean that I can use class-function like this in my templates?
>
> {if $user->check("you") == "x"}
> ....
> {/if}
yes and no.
$foo->$bar means "{assing var=bar value="propname"}{$foo->$bar}" will
access the property like "{$foo->propname}". (this doesn't work in my
current cvs-checkout, unfortunately. i'll have to look at it.)
but method-calls (like in your exampe) are supported also. your
example should work without modifications.
greetings
messju