class Singleton { static private $instance = NULL;
private function __construct() { }
static public function getInstance() { if (self::$instance == NULL) { self::$instance = new Singleton(); } return self::$instance; }}
(source: http://devzone.zend.com/node/view/id/1714)
People should read this.
Comment by Calixte — October 29, 2008 @ 14:12