note 57620 deleted from language.oop5.abstract by jome
| From: | jome@php.net | Date: | Sun, 09 Oct 2005 06:48:25 +0000 |
| Subject: | note 57620 deleted from language.oop5.abstract by jome | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96711@lists.php.net to get a copy of this message | ||
Note Submitter: eggyknap at gmail dot com
----
Perhaps I've just missed something, but I am having problems with abstract classes containing
data members. The basic problem is this:
abstract class AbsClass {
private $member;
abstract function Something();
}
class RealClass extends AbsClass {
function Something() {
return "Hello";
}
}
... if I create a RealClass object and call Something(), it doesn't return Hello, but if I
remove the declaration of $member, it works again. This particular example doesn't actually
demonstrate the problem - it's more complex than that, and I can't investigate further
right now. But anyway, I'm having problems with abstract classes that have data members in
them; your mileage may vary.