Re: inherited method call
От | Jason k Larson |
---|---|
Тема | Re: inherited method call |
Дата | |
Msg-id | 181165689890.20010428173814@harrison.org обсуждение исходный текст |
Ответ на | inherited method call ("Gyozo Papp" <pgerzson@freestart.hu>) |
Список | pgsql-php |
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
В списке pgsql-php по дате отправления: