Re: [SMARTY-DEV] object problems
| From: | Monte Ohrt | Date: | Tue, 21 Jan 2003 19:20:19 +0000 |
| Subject: | Re: [SMARTY-DEV] object problems | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-570@lists.php.net to get a copy of this message | ||
On Tue, 2003-01-21 at 12:35, M Mohr wrote:
> that is really a difficult situation. and maybe i can make it more
> complicated, with another version :)
>
> {$foo.property}
> {$foo.method p1="p1" p2="p2"}
>
> a method-call has to have at least one parameter, it would be treated as
> a property otherwise.
>
> if you really want to call a method without parameters you have to
> indicate this explicitly
>
> suggestions:
> 1. supply a dummy paramter (CON: a bit wordy)
> 2. {$foo.method } (CON: hard to distinguish to a property)
> 3. {$foo.method()} (ressembling php-syntax. CON: inconsistent)
> 4. {$foo.method ""}) (meaning "empty parameter-list". CON: inconsistent)
>
> most of them are of course incosistent with smarty's existing syntax
> and all of them are far away from perfect.
>
> regards
> messju
You still have a problem with nested objects:
{$foo.bar.blah.blah p1="foo"}
You have to determine each ".", object or array.
Monte