I'm opening up several new threads to get discussion going on the
remaining "being debated" categories referenced in this 1.1 -> 1.2
change spec:
https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests
Shadowing
v1.1 has properties shadow accessors, the suggestion is that
Hi!
> v1.2 Proposes that this be inverted such that if there is an accessor
> defined for a given property name, the accessor will always be used. The
> accessor would be able to get/set/isset/unset the property with the same
> name as the accessor. No direct access to the property would be all
Recursion is guarded by the same mechanism __get uses to avoid recursion.
On 10/26/2012 9:33 AM, Stas Malyshev wrote:
Hi!
v1.2 Proposes that this be inverted such that if there is an accessor
defined for a given property name, the accessor will always be used. The
accessor would be able to get
Hi!
> Recursion is guarded by the same mechanism __get uses to avoid recursion.
__get on recursion returns undefined, __set on recursion does nothing.
However you're saying "No direct access to the property would be allowed
except from within the accessor" - but what this not allowing means?
Just
Sorry I guess I should have been more clear. The recursion would
prevent the accessor from being called which would allow the ordinary
property code to execute, thus accessing the property directly. I
suppose if it were in a setter and the property were not defined by the
accessor then it wou
Hi!
> Sorry I guess I should have been more clear. The recursion would
> prevent the accessor from being called which would allow the ordinary
> property code to execute, thus accessing the property directly. I
This could lead to weird scenarios where the same $foo->bar in random
function co
Well I guess this and many of the other issues from other threads are
the reasons I had it written the way that it is currently (basically an
extension of __get()) but numerous other proposals have muddied the
situation.
On Sunday, October 28, 2012 2:17:47 AM, Stas Malyshev wrote:
Hi!
Sorry