Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64851 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90814 invoked from network); 11 Jan 2013 07:08:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2013 07:08:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.173 smtp173.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.173] ([67.192.241.173:46293] helo=smtp173.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/A7-02684-47ABFE05 for ; Fri, 11 Jan 2013 02:08:36 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp17.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 786CB1881E0; Fri, 11 Jan 2013 02:08:33 -0500 (EST) X-Virus-Scanned: OK Received: by smtp17.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id CD93918832D; Fri, 11 Jan 2013 02:08:32 -0500 (EST) Message-ID: <50EFBA6F.90702@sugarcrm.com> Date: Thu, 10 Jan 2013 23:08:31 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Nikita Popov CC: Clint Priest , PHP Developers Mailing List References: <50E41BB6.4030901@zerocue.com> <50E648BE.2060005@zerocue.com> <50E6822D.9060807@sugarcrm.com> <71B3F435-4289-473B-B4D7-EB2DB5F888A9@zerocue.com> <7213E637-26A2-4F44-82DE-297E751726CD@zerocue.com> <50E6F501.4090806@zerocue.com> <50E75658.6050006@sugarcrm.com> <50E79D16.1090905@zerocue.com> <50EF56BD.3040608@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PHP-RFC] Property Accessors 1.2 : parent::$foo Issue From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Re the ReflectionProperty::getParentProperty($this, 'foo') suggestion, > is this supposed to already get the value of the property (and there > would be an additional method ReflectionProperty::setParentProperty)? I meant getting the ReflectionProperty class, but getting the actual value is an option too. Of course, then it should be method on ReflectionPropertyAccessor, since regular properties don't have this thing. I'm not sure which is better - it depends on how much this would be used. We could even not do anything special at all - as I said, current reflection already has API to allow doing exactly this (well, after property support is added), even if a bit long-winded. > The current property can be obtained through > EG(current_execute_data)->function_state.function. This holds the > accessor function and the property can be taken from its name. Though > this is obviously all a bit dirty and is probably not a good idea. > Probably better to let people explicitly pass the property name. I agree. That's why I also mentioned having __PROPERTY__ - this makes copypasting methods a bit easier since you have less chances of making typo in property names :) -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227