note 52027 deleted from language.oop5.patterns by danbrown
| From: | danbrown@php.net | Date: | Sun, 23 Jan 2011 16:48:42 +0000 |
| Subject: | note 52027 deleted from language.oop5.patterns by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176126@lists.php.net to get a copy of this message | ||
Note Submitter: richard dot quadling at bandvulc dot co dot uk
----
Singletons and subclasses will fail because __construct has to be public SOMEWHERE in the base class
and cannot be hidden in sub classes. Even if the base class is an abstract class (which helps a
little).
You can get abstract base class and singleton sub class working fine EXCEPT that you can create an
instance of the subclass if you use new class(); rather than class::singleton();
So. After many hours of trial and error, no mixing of singletons and subclasses.