Revision
68
Author
emsmith
Date
2006-12-11 13:01:15 -0800 (Mon, 11 Dec 2006)

Log Message

limitations of tooltips make any other use but as a singleton useless

Modified Paths

Diff

Modified: desktop/trunk/lib/tooltips.class.php (67 => 68)


--- desktop/trunk/lib/tooltips.class.php	2006-12-11 16:26:40 UTC (rev 67)
+++ desktop/trunk/lib/tooltips.class.php	2006-12-11 21:01:15 UTC (rev 68)
@@ -27,10 +27,10 @@
 {
 
 	/**
-	 * singleton instances for this class (so you can have multiple tooltip sets)
-	 * @var $singletons array of instanceof Tooltips
+	 * singleton instance for this class
+	 * @var $singletons instanceof Tooltips
 	 */
-	static protected $singletons = array();
+	static protected $singleton;
 
 	/**
 	 * fake tooltip window
@@ -45,15 +45,15 @@
 	 *
 	 * @return void
 	 */
-	public function __construct($name)
+	public function __construct()
 	{
-		if (isset(self::$singletons[$name]))
+		if (isset(self::$singleton))
 		{
 			throw new CC_Exception(
 				'%1$s is a singleton class - use %1$s::instance() to retrieve the current object',
 			'CC_Tooltips');
 		}
-		self::$singletons[$name] = $this;
+		self::$singleton = $this;
 
 		parent::__construct();
 		$this->enable();
@@ -193,13 +193,13 @@
 	 *
 	 * @return object instanceof CC_Tooltips
 	 */
-	static public function instance($name = 'default')
+	static public function instance()
 	{
-		if (!isset(self::$singletons[$name]))
+		if (!isset(self::$singleton))
 		{
-			new CC_Tooltips($name);
+			new CC_Tooltips();
 		}
-		return self::$singletons[$name];
+		return self::$singleton;
 	}
 
 	/**