Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86552 invoked from network); 13 Dec 2011 00:52:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2011 00:52:15 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:51401] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/C1-06964-DB1A6EE4 for ; Mon, 12 Dec 2011 19:52:14 -0500 Received: from [192.168.2.230] (ppp-93-104-105-168.dynamic.mnet-online.de [93.104.105.168]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 1DE325F3E5; Tue, 13 Dec 2011 01:52:11 +0100 (CET) To: Clint M Priest Cc: Pierre Joye , "internals@lists.php.net" In-Reply-To: <9570D903A3BECE4092E924C2985CE4853995598C@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485399554D7@MBX202.domain.local> <7070130643313812382@unknownmsgid> <9570D903A3BECE4092E924C2985CE4853995589C@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE48539955910@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE4853995598C@MBX202.domain.local> Content-Type: text/plain; charset="UTF-8" Date: Tue, 13 Dec 2011 01:52:09 +0100 Message-ID: <1323737529.5219.36.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: RE: [PHP-DEV] Accessors v2 Patch From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Mon, 2011-12-12 at 01:01 +0000, Clint M Priest wrote: > To be complete I should probably add something to the reflection system as well. At present the getters/setters would show up as functions. > > What would be preferable? > 1) Show up as regular functions and let users fend for themselves? > 2) Hide from getMethods() and: > 2.1) Provide getAccessors() - Probably returning a new ReflectionPropertyAccessor class? > 2.2) Provide getGetters(), getSetters() > 3) Modify ReflectionProperty to include hasGetter() and hasSetter() > > Comments? Reflection in PHP typically is leaking the implementation details typically quite a lot instead of abstracting things away (interfaces and Traits are ReflectionClass instances etc.) I didn't look at the implementation but if these accessors are implemented as methods (especially if it can be called just like one) I would go for approach 1) and probably mark with a flag. For everything else we'd probably have to clean-u reflection to leak less details to make sense. johannes > -----Original Message----- > From: Pierre Joye [mailto:pierre.php@gmail.com] > Sent: Sunday, December 11, 2011 6:47 PM > To: Clint M Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Accessors v2 Patch > > oh right, I missed them. Yes, so it is covered as well :) > > On Mon, Dec 12, 2011 at 1:42 AM, Clint M Priest wrote: > > There are already two tests against private read and private write, should I add two for protected as well? > > Cheers, > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >