note 57620 added to language.oop5.abstract

From: Date: Sun, 09 Oct 2005 04:00:37 +0000
Subject: note 57620 added to language.oop5.abstract
Groups: php.notes 
Request: Send a blank email to php-notes+get-96706@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57620 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57620&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57620&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96706) next »