Re: [PHP4BETA] calling member in parent class
| From: | Zeev Suraski | Date: | Mon, 07 Feb 2000 19:01:04 +0000 |
| Subject: | Re: [PHP4BETA] calling member in parent class | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9916@lists.php.net to get a copy of this message | ||
On Mon, 7 Feb 2000, Andrei Zmievski wrote:
> On Mon, 07 Feb 2000, Matthew Hixson wrote:
> > > Regardless of your code size, PHP allows you to have a class definition at
> > > the scope of a single file, and a single file only. That means that no
> > > matter how big your code is, changing the inherited class name, for a given
> > > derived class, is exactly one search&replace. So it boils down to this
> > > difference - a replacement of the parent class name in the 'extends'
> > > statement, vs. a single search and replace. No noticeable difference in my
> > > book...
> >
> > Now, that I did not know. I'm still learning the ways of PHP. I will welcome
> > the $parent feature if and when it is available, but I think I'll survive
> > without it for now.
>
> What if the class you are extending lives in another file and is
> included into the current one?
Was that question directed to me? Again, it doesn't really matter. In
both cases, you would have to:
1. Modify the parent class (which is what we're talking about in the
first place).
2. Modify any of its derived classes.
The only difference is whether you modify just the word after the
'extends' keyword, or all of the occurences of the parent class name in
the file that contains a given derived class.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/