From 52721373f1d94edff24a3e119043b68d60f8ce61 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 7 Oct 2010 18:07:47 -0400 Subject: [PATCH] ...and finally, remove the last binder. Move AuthSignup to use a factory binder. --- .../Core/lib/Horde/Core/{Binder => Factory}/AuthSignup.php | 7 +------ framework/Core/lib/Horde/Registry.php | 12 ++++-------- framework/Core/package.xml | 4 ---- 3 files changed, 5 insertions(+), 18 deletions(-) rename framework/Core/lib/Horde/Core/{Binder => Factory}/AuthSignup.php (68%) diff --git a/framework/Core/lib/Horde/Core/Binder/AuthSignup.php b/framework/Core/lib/Horde/Core/Factory/AuthSignup.php similarity index 68% rename from framework/Core/lib/Horde/Core/Binder/AuthSignup.php rename to framework/Core/lib/Horde/Core/Factory/AuthSignup.php index 78fc2d689..9baf1d4f7 100644 --- a/framework/Core/lib/Horde/Core/Binder/AuthSignup.php +++ b/framework/Core/lib/Horde/Core/Factory/AuthSignup.php @@ -3,7 +3,7 @@ * @category Horde * @package Core */ -class Horde_Core_Binder_AuthSignup implements Horde_Injector_Binder +class Horde_Core_Factory_AuthSignup { public function create(Horde_Injector $injector) { @@ -14,9 +14,4 @@ class Horde_Core_Binder_AuthSignup implements Horde_Injector_Binder return Horde_Core_Auth_Signup::factory($driver, $GLOBALS['conf']['signup']['params']); } - public function equals(Horde_Injector_Binder $binder) - { - return false; - } - } diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 057225426..4767574e9 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -248,11 +248,6 @@ class Horde_Registry 'Horde_Nls' => 'Horde_Core_Autoloader_Callback_Nls' ); - /* Define binders. */ - $binders = array( - 'Horde_Core_Auth_Signup' => new Horde_Core_Binder_AuthSignup(), - ); - /* Define factories. */ $factories = array( 'Horde_Alarm' => array( @@ -275,6 +270,10 @@ class Horde_Registry 'Horde_Core_Controller_RequestMapper', 'getRequestConfiguration', ), + 'Horde_Core_Auth_Signup' => array( + 'Horde_Core_Factory_AuthSignup', + 'create', + ), 'Horde_Db_Adapter' => array( 'Horde_Core_Factory_DbBase', 'create', @@ -373,9 +372,6 @@ class Horde_Registry /* Setup injector. */ $GLOBALS['injector'] = $injector = new Horde_Injector(new Horde_Injector_TopLevel()); - foreach ($binders as $key => $val) { - $injector->addBinder($key, $val); - } foreach ($factories as $key => $val) { $injector->bindFactory($key, $val[0], $val[1]); } diff --git a/framework/Core/package.xml b/framework/Core/package.xml index 4ed31e19e..8d6cfeda9 100644 --- a/framework/Core/package.xml +++ b/framework/Core/package.xml @@ -109,9 +109,6 @@ Application Framework. - - - @@ -417,7 +414,6 @@ Application Framework. - -- 2.11.0