note 88575 added to language.oop5.decon
| From: | bac2day1 at gmail dot com | Date: | Thu, 29 Jan 2009 18:26:42 +0000 |
| Subject: | note 88575 added to language.oop5.decon | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149955@lists.php.net to get a copy of this message | ||
You can also capitalize on singleton for the connection as well.
Just add the following to your class:
class db {
...
private static $instance;
...
public static function singleton() {
if(!isset(self::$instance)) {
$c = __CLASS__;
self::$instance = new $c();
}
return self::$instance;
}
...
}
----
Server IP: 69.147.83.197
Probable Submitter: 143.166.226.61
----
Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php
Edit -- https://master.php.net/note/edit/88575
Del: integrated -- https://master.php.net/note/delete/88575/integrated
Del: useless -- https://master.php.net/note/delete/88575/useless
Del: bad code -- https://master.php.net/note/delete/88575/bad+code
Del: spam -- https://master.php.net/note/delete/88575/spam
Del: non-english -- https://master.php.net/note/delete/88575/non-english
Del: in docs -- https://master.php.net/note/delete/88575/in+docs
Del: other reasons-- https://master.php.net/note/delete/88575
Reject -- https://master.php.net/note/reject/88575
Search -- https://master.php.net/manage/user-notes.php