Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability
| From: | Stas Malyshev | Date: | Fri, 26 Oct 2012 20:37:10 +0000 |
| Subject: | Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63657@lists.php.net to get a copy of this message | ||
Hi!
> an accessor setter method for a property $_state IF that method would
> follow the __set$PROPNAME pattern. As a solution for that, I'd propose
> naming the new magic methods with a so-far-not-taken common prefix: __prop
> - i.e. name them __prop_get_xxx, __prop_set_xxx, and so on.
I think it'd more natural to make it __set__PROPNAME. Though __set_state
is a static method, so maybe we can live with it - except that you won't
be able to declare property named $_state.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227