Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56879 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40099 invoked from network); 12 Dec 2011 03:18:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2011 03:18:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=will.fitch@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=will.fitch@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: will.fitch@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:42301] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/C0-36053-E7275EE4 for ; Sun, 11 Dec 2011 22:18:22 -0500 Received: by qabj40 with SMTP id j40so2614765qab.8 for ; Sun, 11 Dec 2011 19:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=gGoscOJYM23ilxI06Bee1xTCLPs6Wg2Tlss4R8FBdVQ=; b=s8ZMZHn63He4G0r4FSLCGi1wysSP9V+ng+Iz6JFm6290ym10DoJDyR1MsODfQMtiuH CAtcMTt43kH4q3G8h3wv+q+uXW2SGxEER9PuTB7zdKnoswCk5z4M50cHVfDEV05kxzYK OKEcOY3aGlN8xIz905I0rRBlh4WgRmTRZQ4tg= Received: by 10.224.31.66 with SMTP id x2mr15806829qac.27.1323659898950; Sun, 11 Dec 2011 19:18:18 -0800 (PST) Received: from [10.0.0.10] (c-71-225-170-108.hsd1.pa.comcast.net. [71.225.170.108]) by mx.google.com with ESMTPS id dk9sm34095026qab.0.2011.12.11.19.18.16 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Dec 2011 19:18:17 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Sun, 11 Dec 2011 22:18:15 -0500 Cc: Clint M Priest , Pierre Joye , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <9570D903A3BECE4092E924C2985CE485399554D7@MBX202.domain.local> <7070130643313812382@unknownmsgid> <9570D903A3BECE4092E924C2985CE4853995589C@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE48539955910@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE4853995598C@MBX202.domain.local> To: guilhermeblanco@gmail.com X-Mailer: Apple Mail (2.1251.1) Subject: Re: [PHP-DEV] Accessors v2 Patch From: will.fitch@gmail.com (Will Fitch) This approach, in theory, is an interceptor itself. Most use-cases = around this approach will be changing or augmenting an existing property = that is not public. If you wanted to modify this interception, you'd = need to extend the class using it and redefine the getter and/or setter. = =20 On Dec 11, 2011, at 10:02 PM, guilhermeblanco@gmail.com wrote: > I have just one question, partially unrelated. >=20 > How can I make something similar to Interceptors of Java according to > your approach? > For those that have no idea, interceptors is a way to intercept > get/set of a property inside the class and act under this > circumstance. >=20 > []s, >=20 > On Sun, Dec 11, 2011 at 8:01 PM, 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. >>=20 >> 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() >>=20 >> Comments? >>=20 >> -----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 >>=20 >> oh right, I missed them. Yes, so it is covered as well :) >>=20 >> 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? >>=20 >> Cheers, >> -- >> Pierre >>=20 >> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>=20 >=20 >=20 >=20 > --=20 > Guilherme Blanco > MSN: guilhermeblanco@hotmail.com > GTalk: guilhermeblanco > Toronto - ON/Canada >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20