Re: note 11810 added to ref.classobj.php
| From: | Jesus M. Castagnetto | Date: | Thu, 08 Mar 2001 21:57:44 +0000 |
| Subject: | Re: note 11810 added to ref.classobj.php | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-12076@lists.php.net to get a copy of this message | ||
If you are trying to do overriding, then you can just
interrogate (perhaps in the method itself) about what
class (get_class()) the object belongs to, or if it is
a subclass of a particular root class.
You can alway refer to the parent overriden method,
see the "Classes and Objects" page of the manual and
comments/editor's notes therein.
I will add the comment above to your note.
--- gateschris@yahoo.com wrote:
> There is no function to determine if a member
> belongs to a base class or current class eg:
>
> class foo {
> function foo () { }
> function a () { }
> }
>
> class bar extends foo {
> function bar () { }
> function a () { }
> }
>
> lala = new Bar();
> ------------------
> how do we find programmatically if member a now
> belongs to class Bar or Foo.
>
> http://www.php.net/manual/en/ref.classobj.php
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/