Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55546 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71080 invoked from network); 19 Sep 2011 10:37:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2011 10:37:45 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 85.139.253.17 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 85.139.253.17 unknown Linux 2.6 Received: from [85.139.253.17] ([85.139.253.17:33434] helo=alfresco) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/BF-14600-77B177E4 for ; Mon, 19 Sep 2011 06:37:43 -0400 Received: from localhost ([127.0.0.1] helo=clk-0081.mshome.net) by alfresco with esmtp (Exim 4.72) (envelope-from ) id 1R5bEK-0002Wm-Et for internals@lists.php.net; Mon, 19 Sep 2011 11:37:40 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "internals@lists.php.net" References: <4E76320F.6010904@sugarcrm.com> <4E764137.9080507@sugarcrm.com> <4E7685DE.6010805@sugarcrm.com> <4E768C86.3030307@sugarcrm.com> <4E769418.6040200@sugarcrm.com> <4E770163.2090001@sugarcrm.com> <4E770770.60809@sugarcrm.com> Date: Mon, 19 Sep 2011 11:37:40 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.51 (Win32) Subject: Re: [PHP-DEV] __constructor parameter limitations. From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Em Mon, 19 Sep 2011 11:20:56 +0100, Pierre Joye escreveu: > On Mon, Sep 19, 2011 at 12:18 PM, Gustavo Lopes > wrote: > http://www.google.com/codesearch#HmA4mAI_aLc/src/main/java/terrastore/server/impl/support/JsonBucketsProvider.java&q=implements%5C%20MessageBodyWriter&type=cs&l=36 >> >> This is the most common scenario for implementations of this interface >> (see the other search results). > > If we talk about implementing the abstract concept and we use the > interface model to do it, then we do it wrong. I'm out of other > arguments, or maybe one new one, if we implement abstract like > interface, then let kill abstract support, we don't need that. > There's no significant difference between interfaces and abstract classes here. Abstract classes frequently have protected hook methods you can override/implement take more arguments that you need. For instance, you could have: class Form { ... abstract protected function buildHTML($page, $errors, $params, $command); ... } and reasonably not need all the arguments. -- Gustavo Lopes