note 52021 added to language.oop5.patterns
| From: | richard dot quadling at bandvulc dot co dot uk | Date: | Tue, 19 Apr 2005 07:39:20 +0000 |
| Subject: | note 52021 added to language.oop5.patterns | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88197@lists.php.net to get a copy of this message | ||
Further to my note. If you think I called the wrong method in the last line of code ...
$subclass2Instance->TellMe();
Notice I am using the SECOND subclass but a method from the FIRST subclass. This should be the clue
to see that multiple subclasses of a base singleton class don't work.
If you try to call ...
$subclass2Instance->TellMeMore();
you get, as expected, a fatal error ...
Fatal error: Call to undefined method SubClass::TellMeMore()
Hope that clarifies things.
----
Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52021
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52021&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52021&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52021&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52021&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52021&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52021&report=yes
Search -- http://master.php.net/manage/user-notes.php