Re: [SMARTY-DEV] objects: one more approach
| From: | Andrei Zmievski | Date: | Wed, 22 Jan 2003 03:21:26 +0000 |
| Subject: | Re: [SMARTY-DEV] objects: one more approach | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-578@lists.php.net to get a copy of this message | ||
On Wed, 15 Jan 2003, Monte Ohrt wrote:
> I have a prototype working. But a problem exists with registering
> objects. How would you register them?
>
> {$foo->bar p1="foo" p2="bar"}
> {$zeebeefoo->bar p1="foo" p2="bar"}
> {$blah.bleh->zeebeefoo->bar p1="foo" p2="bar"}
>
> How are these going to get registered? Maybe we don't do object
> registration and we stick to not allowing access to private methods when
> security is enabled. Any other access restrictions are handled by the
> object?
>
> There is also the issue with identifying property vs. method. At compile
> time the compiler doesn't know which is which. Should it send it to a
> function that figures it out at runtime? I'd rather be able to
> distinguish this at compile time and keep the compiled code faster.
<sigh>
This message-consuming topic really does prove my original point that
template systems (and Smarty especially) do not have any business
calling object methods. The proverbial can of worms, priced conveniently
at $0.02, is not far away at your favorite Hack-n-Shop supermarket.
-Andrei http://www.gravitonic.com/