note 95766 added to language.oop5.patterns
| From: | marius at osu1 dot php dot net | Date: | Thu, 21 Jan 2010 02:25:23 +0000 |
| Subject: | note 95766 added to language.oop5.patterns | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165150@lists.php.net to get a copy of this message | ||
<?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
----
Server IP: 194.24.174.37
Probable Submitter: 89.75.112.238
----
Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php
Edit -- https://master.php.net/note/edit/95766
Del: integrated -- https://master.php.net/note/delete/95766/integrated
Del: useless -- https://master.php.net/note/delete/95766/useless
Del: bad code -- https://master.php.net/note/delete/95766/bad+code
Del: spam -- https://master.php.net/note/delete/95766/spam
Del: non-english -- https://master.php.net/note/delete/95766/non-english
Del: in docs -- https://master.php.net/note/delete/95766/in+docs
Del: other reasons-- https://master.php.net/note/delete/95766
Reject -- https://master.php.net/note/reject/95766
Search -- https://master.php.net/manage/user-notes.php