Please note that I have updated and clarified v1.2 with some recent
feedback:
1) Steve Clay suggested the term Guarded Property and dropping
Shadowing. The "Shadowing" section has been renamed to "Guarding," some
of the wording was updated and the "For Additional Clarity" was updated
with nearly identical wording Steve suggested which I think brings even
greater clarity.
2) The parent::$foo issue I recently posted about was changed near the
end of the "Overloading Properties" section, which shows the proposed
parent->$Milliseconds form. Seeing it color coded in this light makes
it even more appealing and apparent I feel.
3) Removal of Accessor section was added. This was brought up as a
question as to what happens and I felt what should be done is what is
defined there.
Other possible alternatives to number 3:
3a) The public $Foo = 5 declaration would not "shed" it's inherited
accessors, they would remain or could be re-defined (but not removed).
3b) The public $Foo = 5 declaration would not be allowed with the = 5
and it would not shed its inherited accessors as 3a
For maximum flexibility, I favor the proposed solution as it provides
for the most flexibility, it would allow sub-classes to re-define a
guarded property as a traditional property, or keep it as a guarded
property (modifying the getter, adding a setter, etc).
On 1/2/2013 5:36 AM, Clint Priest wrote:
Here is the updated RFC incorporating the feedback from previous
rounds of discussion.
https://wiki.php.net/rfc/propertygetsetsyntax-v1.2
I'm posting it for final review so I can move to voting on Jan 7th.
Please note that the current fork is not quite up-to-date with the RFC
but will be within a few more days.
-Clint
--
-Clint