Re: Property Accessors 1.2 for Final Review before Vote

From: Date: Thu, 03 Jan 2013 05:52:40 +0000
Subject: Re: Property Accessors 1.2 for Final Review before Vote
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Jan 2, 2013, at 10:24 PM, Clint Priest <[email protected]> wrote:
> I've updated the Shadowing section of the RFC which I hope clears this up, it also
> includes a slightly modified version of your example at the bottom with comments.

Updated RFC really helps. The notion of $this->prop access semantics depending on which accessor
you're in seems important for the RFC as I think it will seem foreign to a lot of devs.

When I make traditional PHP "accessor" methods, I have complete control; if I want
getFoo() to set private $foo without calling setFoo(), I can. Not so with real accessors. Probably a
good thing :)

One more concern, sorry if it was covered already: will case-insensitivity of methods mean you
can't define getters for both $foo and $Foo?

Steve


Thread (52 messages)

« previous php.internals (#64492) next »