Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9999 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96877 invoked by uid 1010); 21 May 2004 16:25:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96847 invoked from network); 21 May 2004 16:25:03 -0000 Received: from unknown (HELO mx.thebrainroom.net) (65.200.24.98) by pb1.pair.com with SMTP; 21 May 2004 16:25:03 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id DFD2514880BF; Fri, 21 May 2004 09:25:01 -0700 (PDT) Received: from BAUMBART (p508EB958.dip.t-dialin.net [80.142.185.88]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id 09B75148809B; Fri, 21 May 2004 09:24:58 -0700 (PDT) Date: Fri, 21 May 2004 18:23:07 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <110719642.20040521182307@marcus-boerger.de> To: Bert Slagter Cc: internals@lists.php.net In-Reply-To: <20040521125205.72466.qmail@pb1.pair.com> References: <20040521125205.72466.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.8 required=5.0 tests=PRIORITY_NO_NAME autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] Extending internal classes like mysqli From: helly@php.net (Marcus Boerger) Hello Bert, some of the internal classas cannot be extended and unfortunatley they are not marked as 'final' right now. For you that means you need to extend it by a proxy class that reimplements the original class protocol and uses the original class as a property. Friday, May 21, 2004, 2:52:08 PM, you wrote: > Good afternoon! > Could anyone explain what we're supposed to do with internal classes > like the mysqli class. > In an article on Zend.com > (http://www.zend.com/php5/articles/php5-mysqli.php) the fact that the > object oriented interface can be extended is brought as a major feature. > But it seems that it's impossible to extend the mysqli class, see my bug > at http://bugs.php.net/bug.php?id=28430. > What I want is this. I need some custom logging for my database layer. > So I want to extend the mysqli class and overwrite one or two methods > and add some custom methods. > Shouldn't I be able to just do: > class foo extends mysqli > { > } > $foo = new foo(); > Right now this doesn't work - the variable $foo->thread_id isn't > available for example. > Is this intended behaviour? > Bert Slagter -- Best regards, Marcus mailto:helly@php.net