Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26288 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1537 invoked by uid 1010); 31 Oct 2006 20:39:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1521 invoked from network); 31 Oct 2006 20:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2006 20:39:53 -0000 Authentication-Results: pb1.pair.com header.from=evert@rooftopsolutions.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=evert@rooftopsolutions.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rooftopsolutions.nl from 66.207.192.6 cause and error) X-PHP-List-Original-Sender: evert@rooftopsolutions.nl X-Host-Fingerprint: 66.207.192.6 smtp1.beanfield.net FreeBSD 4.6-4.9 Received: from [66.207.192.6] ([66.207.192.6:2974] helo=smtp1.beanfield.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/AD-03994-794B7454 for ; Tue, 31 Oct 2006 15:39:53 -0500 Received: from [66.207.213.206] (66-207-213-206.beanfield.net [66.207.213.206]) by smtp1.beanfield.net (8.13.4/8.12.11) with ESMTP id k9VKdWKN066892 for ; Tue, 31 Oct 2006 15:39:33 -0500 (EST) (envelope-from evert@rooftopsolutions.nl) Message-ID: <4547B492.9080809@rooftopsolutions.nl> Date: Tue, 31 Oct 2006 15:39:46 -0500 Reply-To: evert@rooftopsolutions.nl User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 CC: internals@lists.php.net References: <4547AE3D.3010706@rooftopsolutions.nl> <4547B12C.1010501@albumltd.co.nz> In-Reply-To: <4547B12C.1010501@albumltd.co.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Using grand-parent constructor From: evert@rooftopsolutions.nl (Evert | Rooftop) Yes, but I want to ignore Parent behaviour, and Re-inherit GrandParent behaviour.. Evert Jasper Bryant-Greene wrote: > 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 >> >> > >