note 88443 deleted from language.oop5.patterns by danbrown

From: Date: Sat, 24 Jan 2009 16:49:35 +0000
Subject: note 88443 deleted from language.oop5.patterns by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149729@lists.php.net to get a copy of this message
Note Submitter: lokher at gmail dot com ---- 22-Jan-2009 09:34 vaddsm(at)gmail.com: Nice code vaddsm but the whole point with a singleton class is that it is only possible to intanciate the class once and only once. For instance the following example will create multiple instances of fClassTwo: <?php $MySingleton = new fSingleton(); $MySingleton->fClassTwo->get(); $YourSingleton = new fSingleton(); $YourSingleton->fClassTwo->get(); $instance_3 = new fClassTwo(); $instance_4 = new fClassTwo(); $instance_5 = clone $instance_3; ?>

« previous php.notes (#149729) next »