Re: RFC Proposal - Attributes read/write visibility
| From: | Daniel Macedo | Date: | Mon, 16 Jul 2012 15:57:22 +0000 |
| Subject: | Re: RFC Proposal - Attributes read/write visibility | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61321@lists.php.net to get a copy of this message | ||
That is already accounted for, both the visibility (what's inside
limits what's before the variable) as well as changing the
write-only/read-only options. If you read the RFC, when extending a
class and adding "set" method to a member that was read-only, you
overload the read-only setting...
Hence on the example you gave I expect the set method to be available
privately, and the visibility to be decreased from public to
protected.
Might not make a lot of sense to have it all together (even on legacy
code - you do review before committing, right? :), but it's accounted
for when extending classes.