Re: how to access private property?
| From: | Arno Coetzee | Date: | Tue, 06 Mar 2007 12:14:54 +0000 |
| Subject: | Re: how to access private property? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249922@lists.php.net to get a copy of this message | ||
Nicholas Yim wrote:
> Hello Everyone,
>
> [code]
> class MyClass {
> private $prop;
> }
> $obj=new MyClass;
> [/code]
>
> is there anyway to read and write MyClass->prop, except serialize
>
> Best regards,
>
> Nicholas Yim
> nick.yim@taowap.com
> 2007-03-06
>
>
why not have a public function that returns the value of the private
variable $prop...
--
Arno Coetzee
Flash Media Group
Developer
Mobile : 27 82 693 6180
Office : 27 12 430 7597