Remove singleton().
authorJan Schneider <jan@horde.org>
Fri, 9 Jan 2009 14:16:13 +0000 (15:16 +0100)
committerJan Schneider <jan@horde.org>
Fri, 9 Jan 2009 14:16:13 +0000 (15:16 +0100)
framework/Vcs/lib/Horde/Vcs.php

index 812ced3..a929ba1 100644 (file)
@@ -103,35 +103,6 @@ class Horde_Vcs
     }
 
     /**
-     * Attempts to return a reference to a concrete Horde_Vcs instance based
-     * on $driver. It will only create a new instance if no Horde_Vcs
-     * instance with the same parameters currently exists.
-     *
-     * This should be used if multiple types of file backends (and,
-     * thus, multiple Horde_Vcs instances) are required.
-     *
-     * This method must be invoked as: $var = &Horde_Vcs::singleton()
-     *
-     * @param mixed $driver  The type of concrete Horde_Vcs subclass to return.
-     *                       The code is dynamically included.
-     * @param array $params  A hash containing any additional configuration
-     *                       or parameters a subclass might need.
-     *
-     * @return Horde_Vcs  The concrete reference, or PEAR_Error on failure.
-     */
-    static public function &singleton($driver, $params = array())
-    {
-        static $instances = array();
-
-        $signature = serialize(array($driver, $params));
-        if (!isset($instances[$signature])) {
-            $instances[$signature] = &Horde_Vcs::factory($driver, $params);
-        }
-
-        return $instances[$signature];
-    }
-
-    /**
      * Constructor.
      */
     public function __construct()