Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36553 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94118 invoked from network); 26 Mar 2008 17:19:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Mar 2008 17:19:06 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:40547] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/8E-47041-7858AE74 for ; Wed, 26 Mar 2008 12:19:06 -0500 Received: from dhcp-172-28-202-230.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 9CABF11F0E4; Wed, 26 Mar 2008 18:19:00 +0100 (CET) Date: Wed, 26 Mar 2008 18:18:59 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <56335354.20080326181859@marcus-boerger.de> To: "Alexey Zakhlestin" CC: RQuadling@googlemail.com, "Felipe Pena" , "Lars Strojny" , "Robin Fernandes" , internals In-Reply-To: References: <5a8807d10802050343r43742844we89366ec47b57f4b@mail.gmail.com> <46ccd1ab0803241816k413c7605p2c3fb9139afd8536@mail.gmail.com> <5a8807d10803250404o6fd33662wbbf3ff14d296cb2a@mail.gmail.com> <1206444907.11368.4.camel@localhost> <1206445347.5400.1.camel@felipe> <10845a340803260945u7a49d991uac5d39be13cca988@mail.gmail.com> <10845a340803260956g6166feaboc04e55c88a9a1a8c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Inconsistencies when accessing protected members From: helly@php.net (Marcus Boerger) Hello Alexey, Wednesday, March 26, 2008, 6:05:12 PM, you wrote: > On 3/26/08, Richard Quadling wrote: >> It just doesn't seem right to be able to call a private or protected >> method of another instance. Sort of isn't private any more. >> And as for being able to call a protected method of a completely >> different class, just because it shares the same ancestry. That seems >> REALLY wrong. > it is needed for operations on several instances of the same class-hierarchy. > "private" means, that you are the author of the class and you know > what you are doing with instances of this class, but you do not want > to export that inner-functionality. > use case for "protected" is similiar, but relates to cases when you > have hierarchy of classes, which still have some common functionality, > which might be usable for multi-instance operations Thanks. This is the exact way we see this. Anything that violates this rule is a bug. Best regards, Marcus