pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gyozo Papp <pgerzson@freestart.hu>
Cc: [PHP] PostgreSQL <pgsql-php@postgresql.org>
Subject: inherited method call - I got it!
Date: Sun, 29 Apr 2001 13:50:38 +0200
Message-ID: <003101c0d0a2$9c2f5180$a449c5d5@jaguar> (raw)
References: <000b01c0cf30$c86adbc0$0200a8c0@server>
	<002801c0cf37$90aece60$330a0a0a@rutgersinsurance.com>
	<01d701c0cfd1$da709660$1a49c5d5@jaguar>
	<181165689890.20010428173814@harrison.org>


First, thank all of you for your guess & tips.

It wouldn't be so weird to find the right answer if I was thinking about the similarity of PHP and C++ syntax.

and one more pleasure, function overriding is enable and working correctly and all the functions are virtual! OO support of PHP is great! (except multiple inheritance)

So I 've got the answer, look:

 class A {
// you've already known it!
 }
 
 class B extends A 
 {
     function f1($x) 
     {
         A::f1($x*4); //  ancestor class name double colon as the same in C++
         $this->x *= 2;
     }
}





Message-ID: <003101c0d0a2$9c2f5180$a449c5d5@jaguar>
Permalink:  ../003101c0d0a2$9c2f5180$a449c5d5@jaguar/
Also on:    postgresql.org/message-id/003101c0d0a2$9c2f5180$a449c5d5@jaguar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: pgerzson@freestart.hu
  Subject: Re: inherited method call - I got it!
  In-Reply-To: <003101c0d0a2$9c2f5180$a449c5d5@jaguar>
  References: <000b01c0cf30$c86adbc0$0200a8c0@server> <002801c0cf37$90aece60$330a0a0a@rutgersinsurance.com> <01d701c0cfd1$da709660$1a49c5d5@jaguar> <181165689890.20010428173814@harrison.org> <003101c0d0a2$9c2f5180$a449c5d5@jaguar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox