Re: [SMARTY-DEV] Re: object support
| From: | Monte Ohrt | Date: | Mon, 13 Jan 2003 20:22:08 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: object support | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-528@lists.php.net to get a copy of this message | ||
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