Re: how to mark protected properties?
| From: | Mika Tuupola | Date: | Tue, 08 Jun 2004 09:36:24 +0000 |
| Subject: | Re: how to mark protected properties? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30142@lists.php.net to get a copy of this message | ||
On Tue, 8 Jun 2004, Bertrand Mansion wrote:
> >IMHO, as silly as sounds to prefix all vars with '_', sounds to create
> >dozen methods/calls for getting access to those protected vars.
>
> If you are clever, all you need is 2 methods.
> That's called key-value coding.
Object overloading is your friend. Look at __call() in the
end of this source:
http://www.appelsiini.net/~tuupola/php/DB_DataContainer/source/
--
Mika Tuupola http://www.appelsiini.net/~tuupola/