note 95766 deleted from language.oop5.patterns by danbrown
| From: | danbrown@php.net | Date: | Thu, 21 Jan 2010 03:31:54 +0000 |
| Subject: | note 95766 deleted from language.oop5.patterns by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165154@lists.php.net to get a copy of this message | ||
Note Submitter: marius
----
<?php
class Singleton{
protected static $singleton = null;
private function __clone(){}
public static function singleton(){
if(self::$singleton == null){
self::$singleton = new self;
}
return self::$singleton;
}
}
?>
Other implementaion of the singleton design pattern