From 18d43ba149984da617ee8261dac399dd3697a5e5 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 9 Jan 2009 15:16:13 +0100 Subject: [PATCH] Remove singleton(). --- framework/Vcs/lib/Horde/Vcs.php | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/framework/Vcs/lib/Horde/Vcs.php b/framework/Vcs/lib/Horde/Vcs.php index 812ced369..a929ba1d0 100644 --- a/framework/Vcs/lib/Horde/Vcs.php +++ b/framework/Vcs/lib/Horde/Vcs.php @@ -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() -- 2.11.0