Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

From: Date: Fri, 26 Oct 2012 13:44:42 +0000
Subject: Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-63646@lists.php.net to get a copy of this message
On 10/26/12 6:37 AM, Clint Priest wrote:
https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests ------------------------------------------------------------------------ Some people are in favor of the internal functions being generated by an accessor declaration should be invisible and non-callable directly. Others are in favor of leaving them visible and callable.
If we leave them callable, * What would be the effects of users defining the "internal" methods (in both cases of if/if not the accessor is also defined)? Considering current magic methods are *purposefully designed* to be implemented by the user, I expect users to try this and, if it works, release code with it. * I assume one could use them as regular methods? * call_user_func([$foo, '__getpropName']); * $foo->{"__get$propName"} I apologize if these were already covered. Steve Clay -- http://www.mrclay.org/

« previous php.internals (#63646) next »