Re: [SMARTY-DEV] Re: object support
| From: | Monte Ohrt | Date: | Mon, 13 Jan 2003 22:27:20 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: object support | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-530@lists.php.net to get a copy of this message | ||
... and there's an issue with nested objects. support that?
{$foo->bar->blah}
{foo->bar->blah}
If that is OK, then what about method access, that can only be set on
the root object?
Monte
On Mon, 2003-01-13 at 14:22, Monte Ohrt wrote:
> Another idea for object access syntax.
>
> We already support this syntax to access properties of objects:
>
> {$foo->bar}
>
> So why not access methods like this?
>
> {foo->bar p1="p1" p2="p2"}
>
> It is better than the {object ...} syntax, and still keeps a distinction
> between functions and objects, all without conflicting what "foo.bar"
> means. Also, it should be perfectly legal to have a registered function
> and registered object of the same name, and this will work.
>
> This does break a little backward compatability since objects must now
> be registered instead of assigned. But is there really a good reason or
> advantage of having objects mixed with assigned variables?
>
>
> Monte
--
Monte Ohrt <monte@ispi.net>