Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67595 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29318 invoked from network); 31 May 2013 12:20:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2013 12:20:05 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.48 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.212.48 mail-vb0-f48.google.com Received: from [209.85.212.48] ([209.85.212.48:59083] helo=mail-vb0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/55-02347-47598A15 for ; Fri, 31 May 2013 08:20:04 -0400 Received: by mail-vb0-f48.google.com with SMTP id w8so960351vbf.7 for ; Fri, 31 May 2013 05:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tua+Vtz0OPWIgX8O8Z/sg6bHYiiZ5Mb6apWSQx4AZvo=; b=xkvUow/Xs7Ekr8hYlU5V7C6MQTW+MrRanS/3AX0jUChREwN83DbOZ0+cOScTN3JTNV as08bHneieTcD/iMaJANPmXA6XUHPPHptve7SmjJxEuqZ953cOaT3Y1Rz8jI1wUmkGJA UfQ2hwZVWtfOpcGfa5+asxphCHTCr0O6pX4vnzU4oZ4gcpcOOZAV/dq2isoT+AD5RFQO wg0h6aVURSoubz8fB8eB2VM+5prfmL084hA1zMMFjmkgZAGF68PICF45ZcAV0EFzbsC5 mhSxR9AWspEWaDpTTYQwNHe/ioWoGlahmD2SCIPhIc463U0Jmf+DcI+iIFotax9PHJPP wCUw== MIME-Version: 1.0 X-Received: by 10.52.159.72 with SMTP id xa8mr8458116vdb.48.1370002801182; Fri, 31 May 2013 05:20:01 -0700 (PDT) Received: by 10.58.217.197 with HTTP; Fri, 31 May 2013 05:20:01 -0700 (PDT) In-Reply-To: References: <6b642a96e673c29dbaf2f239be15f7f6.squirrel@www.l-i-e.com> Date: Fri, 31 May 2013 08:20:01 -0400 Message-ID: To: Lazare Inepologlou Cc: Richard Lynch , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0160bf484e514b04de02a283 Subject: Re: [PHP-DEV] Cannot call constructor From: ircmaxell@gmail.com (Anthony Ferrara) --089e0160bf484e514b04de02a283 Content-Type: text/plain; charset=ISO-8859-1 Lazare, I cannot agree with you here. This is exactly why the "protected" keyword > exists: to provide a black-box interface for class usage through > inheritance. Yes, this is not automatic and, yes it needs designing, but it > is certainly not against the principles. If it were, we should remove the > "protected" keyword as well. > The protected keyword is there to provide encapsulation. Meaning to allow the responsibilities to be encapsulated within the object tree, rather than being publicly exposed. It is not there to be a "black box", as you still need to bind to a non-public interface to use it. It doesn't have anything to do with providing a "black box interface". It's about delegating encapsulation, but once you extend into a class tree, any notion of being a black box by very definition has to go away (especially since the base class can override or write to any of your protected properties as well)... Anthony --089e0160bf484e514b04de02a283--