Re: [PHP4BETA] calling member in parent class
| From: | Zeev Suraski | Date: | Fri, 04 Feb 2000 20:08:36 +0000 |
| Subject: | Re: [PHP4BETA] calling member in parent class | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9834@lists.php.net to get a copy of this message | ||
On Fri, 4 Feb 2000 garyb@fxt.com wrote:
> ZS said,
> > Why? It's a matter of a trivial search&replace, it's not as if it's a
> > big
> > dael...
>
> I dunno, it appears to me that the usefulness of "parent" is at least as
> high as "this".
Well, it's not a matter of opinions really, here you're simply wrong. You
can't do any OO programming in PHP without $this, period. On the other
hand, there's nothing you cannot do in PHP, that you could do if we added
parent/$patent.
> I've also noticed the widespread use of declaration such as
> var $classname="MyClassName";
> which is a strong hint that there is a set of information about a class that
> is needed to be made available in an organized, sensible fashion, built in
> so that folks don't have to make up their own schemes.
>
> And, gee, one more step or two (adding the ability to tell the user the
> names of the functions, ...) and you have introspection.
You can already get information about the class of a given object, without
the need to manually define MyClassName (PHP 4.0 only). I'm not sure if
someone created a function that returns the methosd a given object
supports, but it's trivial to add.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/