Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11307 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39942 invoked by uid 1010); 17 Jul 2004 00:23:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39889 invoked from network); 17 Jul 2004 00:23:00 -0000 Received: from unknown (HELO mx.thebrainroom.net) (69.55.226.195) by pb1.pair.com with SMTP; 17 Jul 2004 00:23:00 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id 62CFC1488035; Fri, 16 Jul 2004 17:22:59 -0700 (PDT) Received: from BAUMBART (p508EB101.dip.t-dialin.net [80.142.177.1]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id 593331488033; Fri, 16 Jul 2004 17:22:56 -0700 (PDT) Date: Sat, 17 Jul 2004 02:20:59 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <153923663.20040717022059@marcus-boerger.de> To: =?ISO-8859-15?B?RXJpayBGcmFueulu?= Cc: internals@lists.php.net In-Reply-To: <20040716203107.6526.qmail@pb1.pair.com> References: <20040716203107.6526.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=1.3 required=5.0 tests=HTML_20_30,HTML_MESSAGE, PRIORITY_NO_NAME autolearn=no version=2.63 X-Spam-Level: * X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] interface cannot extend a non interfaced class? From: helly@php.net (Marcus Boerger) Hello Erik, interfaces do not allow code (function bodies) nor doe they allow properties. But they allow multiple inheritance. That is a class can inherit multiple interfaces but only one class. The reason for this is a compromise to overcome the problems with multiple inheritance namely the pronlem of name conflicts and virtual inheritance versus normal multiple inheritance. If you need more information on this you should study computer science in the hope of having one of the few teacher being able to explain the details or you coule buy some of the rare books that capture this issue in theory......if not try to get some experience with c++ and MI. marcus Friday, July 16, 2004, 10:31:04 PM, you wrote: > What is the reason for why PHP5 does not allow creating an interface by > extending a non "interfaced" class? > The follow code produces an error saying "CMAES_Section cannot implement > CMAES_DB_Section - it is not an interface in " > /Erik > abstract class CMAES_DB_row { > public funtion bar { > } > } > class CMAES_DB_Section extends CMAES_DB_row { > public funtion foo { > } > } > interface CMAES_Section extends CMAES_DB_Section { > public function display(); > public function fetchBoards(); > } -- Best regards, Marcus mailto:helly@php.net