Re: Q on Class and EXTEND
| From: | Chris Sherwood | Date: | Wed, 03 Sep 2003 17:05:46 +0000 |
| Subject: | Re: Q on Class and EXTEND | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161570@lists.php.net to get a copy of this message | ||
<-- snip -->
> > I dont know much about classes, but dont you want
> >
> > $a = new THECHILD('walter'); //so you can access $a->abc
> >
> > instead of
> >
> > $a = new THEPARENT ('walter');
>
> No, I'm wanting to EXTEND the orginal class.
>
> meaning, my THECHILD class efines new methods/properties, and I want it
used
> as if it was part of the orginal THEPARENT Class.
>
> Me just being picky.
>
> Walter
<-- snip -->
walter you want to do a declaration in the class that you want to use the
base class in ie
when you declare your child class
class Web_child extends WEB_parent
{
-- your new and extended code here
}