Re: [SMARTY-DEV] Re: object support
| From: | Nichlas Löfdahl | Date: | Tue, 14 Jan 2003 10:32:36 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: object support | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-535@lists.php.net to get a copy of this message | ||
Greetings!
Is there a hurry to implement object support in smarty-templates?
My suggestion is that we wait (or at least limit) object-support in
templates until PHP5 with ZE2 is released. Right now PHP4 is semi-OO and I
think it'll be easier to define an object model when we know the future
OO-handling of PHP.
/Nichlas
----- Original Message -----
From: "Monte Ohrt" <monte@ispi.net>
To: "Bharat Mediratta" <bharat@menalto.com>
Cc: "André Rabold" <arabold@nero.com>; "Smarty Dev"
<smarty-dev@lists.php.net>
Sent: Monday, January 13, 2003 11:27 PM
Subject: Re: [SMARTY-DEV] Re: object support
> ... 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>
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php