Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26287 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96011 invoked by uid 1010); 31 Oct 2006 20:24:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95995 invoked from network); 31 Oct 2006 20:24:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2006 20:24:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=jasper@albumltd.co.nz; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jasper@albumltd.co.nz; sender-id=unknown; domainkeys=bad (key type) Received-SPF: error (pb1.pair.com: domain albumltd.co.nz from 210.55.31.88 cause and error) DomainKey-Status: bad (key type) X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: jasper@albumltd.co.nz X-Host-Fingerprint: 210.55.31.88 mail.albumltd.co.nz Linux 2.5 (sometimes 2.4) (4) Received: from [210.55.31.88] ([210.55.31.88:45147] helo=mail.albumltd.co.nz) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/EC-03994-911B7454 for ; Tue, 31 Oct 2006 15:24:58 -0500 Received: from mail.albumltd.co.nz (www.album.co.nz [127.0.0.1]) by mail.albumltd.co.nz (Postfix) with ESMTP id F3091231DFE; Wed, 1 Nov 2006 09:24:53 +1300 (NZDT) DomainKey-Signature: a=rsa-sha1; h=Received:Message-ID:Date:From:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:X-Enigmail-Version:OpenPGP:Content-Type:Content-Transfer-Encoding; b=VzZ5gExGihypBpx+1ub2EDaL0PnhhJZRB8l9DC3QICXw4f2XAsNx/JoivpXd13aRbw6IGCKNDtMzgxHYuRUrCL3o2FSQVavk2MzBCmpWWw5WXsOUxO//oob2yUP8Q+eavDCM9kxiTQiAlb+I+GuO2Aw5Lwf+bE8FOV9calknDPo=; c=nofws; d=albumltd.co.nz; q=dns; s=ks1 Received: from [192.168.225.234] (gate1.digiweb.net.nz [202.174.112.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jasper) by mail.albumltd.co.nz (Postfix) with ESMTP id BCDB8231DFD; Wed, 1 Nov 2006 09:24:53 +1300 (NZDT) Message-ID: <4547B12C.1010501@albumltd.co.nz> Date: Wed, 01 Nov 2006 09:25:16 +1300 Organization: Album Limited User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: evert@rooftopsolutions.nl CC: internals@lists.php.net References: <4547AE3D.3010706@rooftopsolutions.nl> In-Reply-To: <4547AE3D.3010706@rooftopsolutions.nl> X-Enigmail-Version: 0.94.1.0 OpenPGP: id=0A3ABF58 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Using grand-parent constructor From: jasper@albumltd.co.nz (Jasper Bryant-Greene) adding parent::__construct() in the constructors of both Parent and Child should do what you want. Jasper Evert | Rooftop wrote: > Hi List, > > Sorry if this is the wrong list for this kind of stuff.. I'd be happy to > re-post this to the users mailing list. > > With the recent updates that will raise E_STRICT on static calls that > are non static, how do we properly do the following.. > > I have a class named 'GrandParent' a class named 'Parent' and a class > named 'Child' > > GrandParent has a constructor, Parent overrides it and Child does too.. > What if I want to call GrandParent's constructor from the child? > > Most languages allow this through casting the class into the ancestor > and call then call the method, but I can't do this with PHP, or can I ? > The other solution (right now) would be GrandParent::__construct(), but > this is not OOP anymore.. So it seems kind of weird that we get limited > in functionality, for OOP-ness, but not adding the functionality to > solve common design problems that we're raised by introducing this.. > > Will we get casting in the future? > > Evert > -- Jasper Bryant-Greene Director Album Limited jasper@albumltd.co.nz +64 21 708 334 / 0800 425 286 http://www.albumltd.co.nz/