inherited method call

Поиск
Список
Период
Сортировка
От Gyozo Papp
Тема inherited method call
Дата
Msg-id 01d701c0cfd1$da709660$1a49c5d5@jaguar
обсуждение исходный текст
Ответ на RE: HTTP authentication  ("Christian Marschalek" <cm@chello.at>)
Ответы Re: inherited method call  (Jesus Aneiros <aneiros@ucfinfo.ucf.edu.cu>)
Re: inherited method call  (Jason k Larson <jlarson@harrison.org>)
Re: inherited method call  (Jesus Aneiros <aneiros@ucfinfo.ucf.edu.cu>)
Список pgsql-php
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?





В списке pgsql-php по дате отправления:

Предыдущее
От: Jason k Larson
Дата:
Сообщение: Re[4]: HTTP authentication
Следующее
От: Roberto Mello
Дата:
Сообщение: Re: HTTP authentication