pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason k Larson <jlarson@harrison.org>
To: Gyozo Papp <pgerzson@freestart.hu>
Cc: [PHP] PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: inherited method call
Date: Sat, 28 Apr 2001 17:38:14 -0600
Message-ID: <181165689890.20010428173814@harrison.org> (raw)
In-Reply-To: <01d701c0cfd1$da709660$1a49c5d5@jaguar>
References: <000b01c0cf30$c86adbc0$0200a8c0@server>
	<002801c0cf37$90aece60$330a0a0a@rutgersinsurance.com>
	<01d701c0cfd1$da709660$1a49c5d5@jaguar>

I know you can do a few simple things like determine if it's a
subclass and get the parent classes name, etc.

Here's where I found some info.
http://www.php.net/manual/en/ref.classobj.php

Maybe this will help .. maybe it won't.

Jason k Larson
<?echo(join(" ",split("[.]",base64_decode(strrev("=8iKuIXZrNWYI5CUIBlLyVGa09mbB5CdzVnSuoyL")))));?>


GP> Hello,

GP> my question is related to just PHP not postgres, but I hope you'll be so kind to help me.
GP> So, how can I call an inherited method which is overriden in the derived class?
GP> a short exmple - if my explanation is not so clear to unterstand:

GP> class A {
GP>     var $x;
GP>     function A() { $this->x = 0; }
GP>     function f1($x) { $this->x = ++$x; }
GP> }

GP> class B extends A 
GP> {
GP>     function B() {$this->x = 1; }

GP>     function f1($x) 
GP>     {
GP> # now I want to access the original f1() function, ie .:
GP>         // $this->f1($x*4);
GP> # and perform some  additional operations ie.:
GP>         // $this->x *= 2;
GP>     }
GP> }

GP> Is there any possilbe work-around 
GP>     or I have to duplicate the code of the inherited function,
GP>     or leave functions the same and create new functions which calls the inherited ones?





GP> ---------------------------(end of broadcast)---------------------------
GP> TIP 5: Have you checked our extensive FAQ?

GP> http://www.postgresql.org/users-lounge/docs/faq.html





view thread (3+ messages)

Message-ID: <181165689890.20010428173814@harrison.org>
Permalink:  ../181165689890.20010428173814@harrison.org/
Also on:    postgresql.org/message-id/181165689890.20010428173814@harrison.org

 · 

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: jlarson@harrison.org, pgerzson@freestart.hu
  Subject: Re: inherited method call
  In-Reply-To: <181165689890.20010428173814@harrison.org>
  References: <000b01c0cf30$c86adbc0$0200a8c0@server> <002801c0cf37$90aece60$330a0a0a@rutgersinsurance.com> <01d701c0cfd1$da709660$1a49c5d5@jaguar> <181165689890.20010428173814@harrison.org>

* 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