On Wed, 3 Sep 2003 10:05:46 -0700 "Chris Sherwood" <[EMAIL PROTECTED]> wrote:
> > <-- 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 > } > and then ... to access the class methods and variables of the parent, you do it through the child. class THEPARENT var $originalthis; function THEPARENT(){ } } class THECHILD extends THEPARENT var $this; function THECHILD($that) { $this->this = $that; } } // outside the class $clss = new THECHILD($thatvar); $clss->originalthis = 'how about that'; -- Raquel ============================================================ Let no man imagine that he has no influence. Whoever he may be, and wherever he may be placed, the man who thinks becomes a light and a power. --Henry George -- Raquel ============================================================ Let no man imagine that he has no influence. Whoever he may be, and wherever he may be placed, the man who thinks becomes a light and a power. --Henry George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php