Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26290 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19715 invoked by uid 1010); 31 Oct 2006 21:45:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 19700 invoked from network); 31 Oct 2006 21:45:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2006 21:45:59 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.182.186 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 64.233.182.186 nf-out-0910.google.com Linux 2.4/2.6 Received: from [64.233.182.186] ([64.233.182.186:62706] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/10-03994-414C7454 for ; Tue, 31 Oct 2006 16:45:58 -0500 Received: by nf-out-0910.google.com with SMTP id o63so403761nfa for ; Tue, 31 Oct 2006 13:45:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UDI7Zoks/EXKbYNwXO/3NNhXk21QhoAt88bdbrdLCfMjGLgF/HeMWsAWPqoTpD6EUeO/FmrhF59xbXbpI9BstK7mZNv8brWuWlPzu8bm5Vo7XeMWE4a+20Kl476cL8rGwEjVSyG47iHcy8Ru4nwuR9iWXjtMyISYkdIVSxYkhq0= Received: by 10.48.80.20 with SMTP id d20mr2267500nfb.1162331151780; Tue, 31 Oct 2006 13:45:51 -0800 (PST) Received: by 10.48.230.3 with HTTP; Tue, 31 Oct 2006 13:45:51 -0800 (PST) Message-ID: <7f3ed2c30610311345r1e16da7do7d11e9e9bd83323b@mail.gmail.com> Date: Tue, 31 Oct 2006 22:45:51 +0100 To: evert@rooftopsolutions.nl Cc: internals@lists.php.net In-Reply-To: <4547B492.9080809@rooftopsolutions.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4547AE3D.3010706@rooftopsolutions.nl> <4547B12C.1010501@albumltd.co.nz> <4547B492.9080809@rooftopsolutions.nl> Subject: Re: [PHP-DEV] Using grand-parent constructor From: hannes.magnusson@gmail.com ("Hannes Magnusson") GrandParent::__construct(); On 10/31/06, Evert | Rooftop wrote: > 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 > >> > >> > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >