private_write/protected_write properties

From: Date: Wed, 18 Jul 2007 20:21:48 +0000
Subject: private_write/protected_write properties
Groups: php.internals 
Request: Send a blank email to internals+get-31065@lists.php.net to get a copy of this message
Hi all, I'll probably be lynched for bringing up this subject again, since it caused a long discussion a year ago. Anyway I look in the archives and there was never a real conclusion made, so I'm bringing it up again. This time for a feature I personally would like to see in PHP 6. Very often I want to be able to be get a property publicly, while only being able to set it within the class. You can solve this by using a getPropery() method or by using __get($property), but this feels more like a workaround. I think the private/public state of properties is becoming more important now that using public frameworks is becoming main stream. Therefor I believe this would be a good addition. Best regards, Arnold

« previous php.internals (#31065) next »