jsWalter wrote:

-----Original Message-----
From: Matt Matijevich [mailto:[EMAIL PROTECTED]

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.

It doesn't work that way, exactly. The child class can define new methods and properties, but you must make an instance of the child class, which will include the methods/properties from the parent, and the new ones you have written.


If I'm understanding you correctly, you could rename you parent class to child, name the child class the same as your parent and have the "old class" extend the "new class" you've written. You code should then work the same, but have the new methods/properties available.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to