Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59260 invoked from network); 26 Oct 2012 17:41:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2012 17:41:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@bof.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@bof.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: php@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:46855] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/31-51104-56BCA805 for ; Fri, 26 Oct 2012 13:41:59 -0400 Received: (qmail 16993 invoked by uid 1009); 26 Oct 2012 19:41:54 +0200 Received: from 209.85.223.170 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/15503. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.223.170):. Processed in 0.0994 secs); 26 Oct 2012 17:41:54 -0000 X-Antivirus-MYDOMAIN-Mail-From: php@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.223.170):. Processed in 0.0994 secs Process 16987) Received: from mail-ie0-f170.google.com (gmail@bof.de@209.85.223.170) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 26 Oct 2012 19:41:54 +0200 Received: by mail-ie0-f170.google.com with SMTP id c12so4887599ieb.29 for ; Fri, 26 Oct 2012 10:41:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.193.161 with SMTP id hp1mr2982938igc.27.1351273311942; Fri, 26 Oct 2012 10:41:51 -0700 (PDT) Received: by 10.50.150.228 with HTTP; Fri, 26 Oct 2012 10:41:51 -0700 (PDT) Received: by 10.50.150.228 with HTTP; Fri, 26 Oct 2012 10:41:51 -0700 (PDT) In-Reply-To: <508A67E6.2000405@zerocue.com> References: <508A67E6.2000405@zerocue.com> Date: Fri, 26 Oct 2012 19:41:51 +0200 Message-ID: To: Clint Priest Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=14dae9340df7c0b6ee04ccf9d53a Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: php@bof.de (Patrick Schaaf) --14dae9340df7c0b6ee04ccf9d53a Content-Type: text/plain; charset=ISO-8859-1 I'm all for having the "internal" methods being totally normal magic methods, for the reduced complexity reasons already mentioned. I would also expect to be able to simply define such a magic method myself, and have it behave in just the same way as when defining it using the accessor declaration syntactic sugar. To formulate it a different way: first expand on the current __get/__set magic methods by clearly documenting a new set of per-property-name magic methods, and the rules when they are called. Then on top of that, introduce and document the accessor declaration syntactic sugar. One point that came up some time ago, I'd like to mention again: there is already a magic method named __set_state which would collide head on with 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. best regards Patrick --14dae9340df7c0b6ee04ccf9d53a--