Re: [SMARTY] Accessing Objects of other objects?
| From: | Martin Kloss | Date: | Fri, 29 Aug 2003 13:18:51 +0000 |
| Subject: | Re: [SMARTY] Accessing Objects of other objects? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10153@lists.php.net to get a copy of this message | ||
At 15:07 29.08.03 +0200, you wrote:
On page "A" of my homepage I create an object "1" which itself creates an object "2". Now how can I access the properties of object "2" from "A" ?Hi Webmaster (?), you should probably ask this question on a php mailing list, since this list is dedicated to Smarty, not general php questions. Accessing properties should be done through accessor methods, so your object A should have a method that returns the value: function a_getprop (foo) { return b_getprop(bar); } echo A.a_getprop(whatever); You didn't provide any code, so it's difficult to say what doesn't work in your scripts. But I don't want to start an OT thread here...:-) Martin.