Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80098 invoked by uid 1010); 16 Feb 2004 05:55:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80052 invoked from network); 16 Feb 2004 05:55:19 -0000 Received: from unknown (HELO lakemtao02.cox.net) (68.1.17.243) by pb1.pair.com with SMTP; 16 Feb 2004 05:55:19 -0000 Received: from velum.net ([68.98.128.109]) by lakemtao02.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040216055517.ZBLL19763.lakemtao02.cox.net@velum.net> for ; Mon, 16 Feb 2004 00:55:17 -0500 Message-ID: <40305B44.20002@velum.net> Date: Mon, 16 Feb 2004 00:55:16 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916 X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: extending interfaces - fringe behavior From: hans@velum.net (Hans Lellelid) I have a need in a current application to extend interfaces and possibly re-define (change signature) some of the inherited methods in the child interface. e.g. interface Foo { public function __construct(MyCls $var); public function myFunction(); } interface Bar extends Foo { public function __construct(MyCls $var, $var2 = null); public function myOtherFunction(); } class A implements Bar { public function __construct(MyCls $var, $var2 = null) { // ... } public function myFunction() { // ... } public function myOtherFunction() { // ... } } This is not currently possible in PHP5b4, due to the (new?) "Can't inherit abstract function" errors generated by the engine. I.e. if I try to redefine __construct() I will get an error. The need for this capability is probably not that mainstream, but it'd be very nice. Is there any chance of having support for this behavior? I don't know anything about the underlying mechanism for supporting interface extension, so I don't know if what I'm asking is trivial or not. Thanks, Hans