Re: Class Properties in Interfaces?
| From: | Jens Himmelrath | Date: | Tue, 06 May 2008 21:53:22 +0000 |
| Subject: | Re: Class Properties in Interfaces? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37507@lists.php.net to get a copy of this message | ||
Hi All,
Lars Strojny schrieb:
>> Hi Marcus!
>>
>> Am Dienstag, den 06.05.2008, 21:45 +0200 schrieb Marcus Boerger:
>> [...]
>>>> All fine with me. However we *would* need to specify which
>>>> function is getter, setter, isset or unset.
>>
>> [...]
>>>> public $property { string public function __get() { return
>>>> $this->_property; } string protected function __set(string
>>>> $value) {...} }
>>
>> That's the variant I prefer. It is pretty similar to the C# does it
>> and therefore follows the common PHP strategy of steeling
>> everything together ;)
I'd really like to use that functionality instead of my current getXXX()
setXXX().
Back to lurking.
regards,
Jens