Re: inherited method call

From: Jesus Aneiros <aneiros(at)ucfinfo(dot)ucf(dot)edu(dot)cu>
To: Gyozo Papp <pgerzson(at)freestart(dot)hu>
Cc: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
Subject: Re: inherited method call
Date: 2001-04-28 22:03:05
Message-ID: Pine.LNX.4.10.10104281801450.15754-100000@ucfinfo.ucf.edu.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

I think it is not posible to call an override method. The OO in PHP is far
from being complete.

I hope my answer will be incorrect :-)

Saludos, jesus.

On Sat, 28 Apr 2001, Gyozo Papp wrote:

> Hello,
>
> my question is related to just PHP not postgres, but I hope you'll be so kind to help me.
> So, how can I call an inherited method which is overriden in the derived class?
> a short exmple - if my explanation is not so clear to unterstand:
>
> class A {
> var $x;
> function A() { $this->x = 0; }
> function f1($x) { $this->x = ++$x; }
> }
>
> class B extends A
> {
> function B() {$this->x = 1; }
>
> function f1($x)
> {
> # now I want to access the original f1() function, ie .:
> // $this->f1($x*4);
> # and perform some additional operations ie.:
> // $this->x *= 2;
> }
> }
>
> Is there any possilbe work-around
> or I have to duplicate the code of the inherited function,
> or leave functions the same and create new functions which calls the inherited ones?
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Jesus Aneiros 2001-04-28 22:06:34 RE: Re[2]: HTTP authentication
Previous Message Christian Marschalek 2001-04-28 17:44:43 RE: HTTP authentication