Refer to Horde_Db_Adapter (the interface), not Horde_Db_Adapter_Base (the abstract...
authorChuck Hagenbuch <chuck@horde.org>
Sun, 3 Oct 2010 02:39:13 +0000 (22:39 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 3 Oct 2010 02:39:42 +0000 (22:39 -0400)
29 files changed:
content/lib/Objects/Manager.php
content/lib/Tagger.php
content/lib/Types/Manager.php
content/lib/Users/Manager.php
content/test/Tags/TaggerTest.php
framework/ActiveSync/lib/Horde/ActiveSync/State/History.php
framework/Alarm/lib/Horde/Alarm/Sql.php
framework/Auth/lib/Horde/Auth/Sql.php
framework/Cache/lib/Horde/Cache/Sql.php
framework/Core/lib/Horde/Core/Binder/DbBase.php
framework/Core/lib/Horde/Core/Factory/Db.php
framework/Core/lib/Horde/Core/Factory/Prefs.php
framework/Core/lib/Horde/Registry.php
framework/Group/lib/Horde/Group/Sql.php
framework/Lock/lib/Horde/Lock/Sql.php
framework/Perms/lib/Horde/Perms/Permission/SqlObject.php
framework/Perms/lib/Horde/Perms/Sql.php
framework/Prefs/lib/Horde/Prefs/Sql.php
framework/SessionHandler/lib/Horde/SessionHandler/Sql.php
framework/Token/lib/Horde/Token/Sql.php
framework/admintools/horde-remove-pref.php
framework/admintools/horde-sql-shell.php
horde/admin/activesync.php
horde/bin/db_migrate
horde/lib/Prefs/Ui.php
horde/rpc.php
imp/lib/Quota/Sql.php
imp/lib/Sentmail/Sql.php
skeleton/lib/Driver/Sql.php

index d1f6b54..50f8397 100644 (file)
@@ -21,7 +21,7 @@ class Content_Objects_Manager
     /**
      * Database adapter
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -44,7 +44,7 @@ class Content_Objects_Manager
     /**
      * Constructor
      */
-    public function __construct(Horde_Db_Adapter_Base $db, Content_Types_Manager $typeManager)
+    public function __construct(Horde_Db_Adapter $db, Content_Types_Manager $typeManager)
     {
         $this->_db = $db;
         $this->_typeManager = $typeManager;
index 4688a3a..1f6c5f4 100644 (file)
@@ -32,7 +32,7 @@ class Content_Tagger
 {
     /**
      * Database connection
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -77,7 +77,7 @@ class Content_Tagger
     /**
      * Constructor
      */
-    public function __construct(Horde_Db_Adapter_Base $db,
+    public function __construct(Horde_Db_Adapter $db,
                                 Content_Users_Manager $userManager,
                                 Content_Types_Manager $typeManager,
                                 Content_Objects_Manager $objectManager)
index 317e7b7..2e5932f 100644 (file)
@@ -32,7 +32,7 @@ class Content_Types_Manager
         'types' => 'rampage_types',
     );
 
-    public function __construct(Horde_Db_Adapter_Base $db)
+    public function __construct(Horde_Db_Adapter $db)
     {
         $this->_db = $db;
     }
index 2d8fde4..63f5f90 100644 (file)
@@ -32,7 +32,7 @@ class Content_Users_Manager
         'users' => 'rampage_users',
     );
 
-    public function __construct(Horde_Db_Adapter_Base $db)
+    public function __construct(Horde_Db_Adapter $db)
     {
         $this->_db = $db;
     }
index 0e89786..da640c5 100644 (file)
@@ -21,7 +21,7 @@ class Content_Tags_TaggerTest extends PHPUnit_Framework_TestCase
         $injector = new Horde_Injector(new Horde_Injector_TopLevel());
 
         $db = new Horde_Db_Adapter_Pdo_Sqlite(array('dbname' => ':memory:'));
-        $injector->setInstance('Horde_Db_Adapter_Base', $db);
+        $injector->setInstance('Horde_Db_Adapter', $db);
 
         $this->tagger = $injector->getInstance('Content_Tagger');
 
index a74b06d..db98d63 100644 (file)
@@ -67,7 +67,7 @@ class Horde_ActiveSync_State_History extends Horde_ActiveSync_State_Base
     /**
      * DB handle
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -94,7 +94,7 @@ class Horde_ActiveSync_State_History extends Horde_ActiveSync_State_Base
     public function __construct($params = array())
     {
         parent::__construct($params);
-        if (empty($this->_params['db']) || !($this->_params['db'] instanceof Horde_Db_Adapter_Base)) {
+        if (empty($this->_params['db']) || !($this->_params['db'] instanceof Horde_Db_Adapter)) {
             throw new InvalidArgumentException('Missing or invalid Horde_Db parameter.');
         }
 
index c8c0b16..dfe994e 100644 (file)
@@ -23,7 +23,7 @@ class Horde_Alarm_Sql extends Horde_Alarm
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -32,7 +32,7 @@ class Horde_Alarm_Sql extends Horde_Alarm
      *
      * @param array $params  Configuration parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the tokens table in 'database'.
      *           DEFAULT: 'horde_alarms'
      * </pre>
index a5ec6fd..4d17307 100644 (file)
@@ -36,7 +36,7 @@ class Horde_Auth_Sql extends Horde_Auth_Base
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -44,7 +44,7 @@ class Horde_Auth_Sql extends Horde_Auth_Base
      * Constructor
      *
      * @param array $params  Parameters:
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] Database object.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] Database object.
      * <pre>
      * 'encryption' - (string) The encryption to use to store the password in
      *                the table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
index 2846f8e..a907855 100644 (file)
@@ -33,7 +33,7 @@ class Horde_Cache_Sql extends Horde_Cache
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -42,7 +42,7 @@ class Horde_Cache_Sql extends Horde_Cache
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the cache table.
      *           DEFAULT: 'horde_cache'
      * </pre>
index fac199d..d3afda6 100644 (file)
@@ -6,10 +6,10 @@
 class Horde_Core_Binder_DbBase implements Horde_Injector_Binder
 {
     /**
-     * Returns the Horde_Db_Adapter_Base object for the default Horde DB/SQL
+     * Returns the Horde_Db_Adapter object for the default Horde DB/SQL
      * configuration.
      *
-     * @return Horde_Db_Adapter_Base
+     * @return Horde_Db_Adapter
      * @throws Horde_Exception
      */
     public function create(Horde_Injector $injector)
index 8749ca7..d084a91 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
- * A Horde_Injector:: based factory for creating Horde_Db_Adapter_Base
- * objects.
+ * A Horde_Injector:: based factory for creating Horde_Db_Adapter objects.
  *
  * PHP version 5
  *
@@ -13,8 +12,7 @@
  */
 
 /**
- * A Horde_Injector:: based factory for creating Horde_Db_Adapter_Base
- * objects.
+ * A Horde_Injector:: based factory for creating Horde_Db_Adapter objects.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
@@ -60,7 +58,7 @@ class Horde_Core_Factory_Db
      * @param mixed $type  The type. If this is an array, this is used as
      *                     the configuration array.
      *
-     * @return Horde_Db_Adapter_Base  The singleton instance.
+     * @return Horde_Db_Adapter  The singleton instance.
      * @throws Horde_Exception
      * @throws Horde_Db_Exception
      */
index 3168167..164e19e 100644 (file)
@@ -106,7 +106,7 @@ class Horde_Core_Factory_Prefs
             case 'Sql':
                 $params['db'] = $this->_injector->getInstance('Horde_Db')->getDb();
                 // @todo All DB's use UTF-8(?) Does not seem to be a way to
-                // get this information from Horde_Db_Adapter_Base.
+                // get this information from Horde_Db_Adapter.
                 $opts['charset'] = 'UTF-8';
                 break;
             }
index cb752b7..dd7fe12 100644 (file)
@@ -270,7 +270,7 @@ class Horde_Registry
             'Horde_Crypt' => 'Horde_Core_Binder_Crypt',
             'Horde_Data' => 'Horde_Core_Binder_Data',
             'Horde_Db' => 'Horde_Core_Binder_Db',
-            'Horde_Db_Adapter_Base' => 'Horde_Core_Binder_DbBase',
+            'Horde_Db_Adapter' => 'Horde_Core_Binder_DbBase',
             'Horde_Db_Pear' => 'Horde_Core_Binder_DbPear',
             'Horde_Group' => 'Horde_Core_Binder_Group',
             'Horde_History' => 'Horde_Core_Binder_History',
index 74f1e92..0d2fe06 100644 (file)
@@ -15,7 +15,7 @@ class Horde_Group_Sql extends Horde_Group
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     public $db;
 
index 6e9479f..62f7cf4 100644 (file)
@@ -33,7 +33,7 @@ class Horde_Lock_Sql extends Horde_Lock
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     private $_db;
 
@@ -42,7 +42,7 @@ class Horde_Lock_Sql extends Horde_Lock
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the lock table in 'database'.
      *           DEFAULT: 'horde_locks'
      * </pre>
index 9ffefac..6c0c889 100644 (file)
@@ -31,7 +31,7 @@ class Horde_Perms_Permission_SqlObject extends Horde_Perms_Permission
     /**
      * Database handle for saving changes.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -48,10 +48,10 @@ class Horde_Perms_Permission_SqlObject extends Horde_Perms_Permission
     /**
      * Sets the helper functions within the object.
      *
-     * @param Horde_Cache $cache         The cache object.
-     * @param Horde_Db_Adapter_Base $db  The database object.
+     * @param Horde_Cache $cache    The cache object.
+     * @param Horde_Db_Adapter $db  The database object.
      */
-    public function setObs(Horde_Cache $cache, Horde_Db_Adapter_Base $db)
+    public function setObs(Horde_Cache $cache, Horde_Db_Adapter $db)
     {
         $this->_cache = $cache;
         $this->_db = $db;
index d3cc80f..165ca90 100644 (file)
@@ -24,7 +24,7 @@ class Horde_Perms_Sql extends Horde_Perms
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -48,7 +48,7 @@ class Horde_Perms_Sql extends Horde_Perms
      * @param array $params  Configuration parameters (in addition to base
      *                       Horde_Perms parameters):
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the perms table.
      *           DEFAULT: 'horde_perms'
      * </pre>
index 7374ea6..32a608c 100644 (file)
@@ -21,7 +21,7 @@ class Horde_Prefs_Sql extends Horde_Prefs
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -33,7 +33,7 @@ class Horde_Prefs_Sql extends Horde_Prefs
      * @param array $params  A hash containing any additional configuration
      *                       or connection parameters a subclass might need.
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the prefs table.
      *           DEFAULT: 'horde_prefs'
      * </pre>
index 61618dc..d3cbc92 100644 (file)
@@ -19,7 +19,7 @@ class Horde_SessionHandler_Sql extends Horde_SessionHandler_Base
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -28,7 +28,7 @@ class Horde_SessionHandler_Sql extends Horde_SessionHandler_Base
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the sessions table.
      *           DEFAULT: 'horde_sessionhandler'
      * </pre>
index db37bb4..9ec26cb 100644 (file)
@@ -27,7 +27,7 @@ class Horde_Token_Sql extends Horde_Token_Base
     /**
      * Handle for the database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -36,7 +36,7 @@ class Horde_Token_Sql extends Horde_Token_Base
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the tokens table.
      *           DEFAULT: 'horde_tokens'
      * 'timeout' - (integer) The period (in seconds) after which an id is
index 8dcd17d..8e1daba 100755 (executable)
@@ -23,7 +23,7 @@ $scope = $cli->prompt('Enter value for pref_scope:');
 $name = $cli->prompt('Enter value for pref_name:');
 
 /* Open the database. */
-$db = $injector->getInstance('Horde_Db_Adapter_Base');
+$db = $injector->getInstance('Horde_Db_Adapter');
 
 if ($live) {
     $sql = 'DELETE FROM horde_prefs WHERE pref_scope = ? AND pref_name = ?';
index fe72c2d..fae7f0a 100755 (executable)
@@ -16,7 +16,7 @@ Horde_Registry::appInit('horde', array(
     'cli' => true
 ));
 
-$dbh = $injector->getInstance('Horde_Db_Base');
+$dbh = $injector->getInstance('Horde_Db_Adapter');
 
 // read sql file for statements to run
 $statements = new Horde_Db_StatementParser($_SERVER['argv'][1]);
index befb786..f7fe257 100644 (file)
@@ -21,7 +21,7 @@ if (empty($conf['activesync']['enabled'])) {
 }
 
 $state_params = array_merge($conf['activesync']['state']['params'], array(
-    'db' => $injector->getInstance('Horde_Db_Adapter_Base')
+    'db' => $injector->getInstance('Horde_Db_Adapter')
 ));
 $stateMachine = new Horde_ActiveSync_State_History($state_params);
 $stateMachine->setLogger($injector->getInstance('Horde_Log_Logger'));
index 3ee402d..74e9ad8 100755 (executable)
@@ -49,7 +49,7 @@ if (!empty($args[1])) {
 // Run
 $dir = $registry->get('fileroot', $app) . '/migration/';
 
-$db = $injector->getInstance('Horde_Db_Adapter_Base');
+$db = $injector->getInstance('Horde_Db_Adapter');
 $logger = new Horde_Log_Logger(new Horde_Log_Handler_Stream(STDOUT));
 $migrator = new Horde_Db_Migration_Migrator($db, $logger, array('migrationsPath' => $dir, 'schemaTableName' => $app . '_schema_info'));
 
index c1e0e12..6be4cc3 100644 (file)
@@ -377,7 +377,7 @@ class Horde_Prefs_Ui
         }
 
         $state_params = array_merge($GLOBALS['conf']['activesync']['state']['params'], array(
-            'db' => $GLOBALS['injector']->getInstance('Horde_Db_Adapter_Base')
+            'db' => $GLOBALS['injector']->getInstance('Horde_Db_Adapter')
         ));
         $stateMachine = new Horde_ActiveSync_State_History($state_params);
         $devices = $stateMachine->listDevices($GLOBALS['registry']->getAuth());
@@ -733,7 +733,7 @@ class Horde_Prefs_Ui
     protected function _updateActiveSyncManagement($ui)
     {
         $state_params = $GLOBALS['conf']['activesync']['state']['params'];
-        $state_params['db'] = $GLOBALS['injector']->getInstance('Horde_Db_Adapter_Base');
+        $state_params['db'] = $GLOBALS['injector']->getInstance('Horde_Db_Adapter');
         $stateMachine = new Horde_ActiveSync_State_History($state_params);
         $stateMachine->setLogger($GLOBALS['injector']->getInstance('Horde_Log_Logger'));
         if ($ui->vars->wipeid) {
index d085af8..e397a05 100644 (file)
@@ -102,7 +102,7 @@ case 'ActiveSync':
     }
 
     $state_params = $conf['activesync']['state']['params'];
-    $state_params['db'] = $injector->getInstance('Horde_Db_Adapter_Base');
+    $state_params['db'] = $injector->getInstance('Horde_Db_Adapter');
     $stateMachine = new Horde_ActiveSync_State_History($state_params);
     $params['registry'] = $registry;
     $driver_params = array(
index 8c24bfe..0ab7e10 100644 (file)
@@ -20,7 +20,7 @@ class IMP_Quota_Sql extends IMP_Quota_Base
     /**
      * DB object.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -29,7 +29,7 @@ class IMP_Quota_Sql extends IMP_Quota_Base
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'query_quota' - (string) SQL query which returns single row/column with
      *                 user quota (in bytes). %u is replaced with current user
      *                 name, %U with the user name without the domain part, %d
index 80c97a2..e3a9acb 100644 (file)
@@ -37,7 +37,7 @@ class IMP_Sentmail_Sql extends IMP_Sentmail_Base
     /**
      * Handle for the current database connection.
      *
-     * @var Horde_Db_Adapter_Base
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -46,7 +46,7 @@ class IMP_Sentmail_Sql extends IMP_Sentmail_Base
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the sentmail table.
      *           DEFAULT: 'imp_sentmail'
      * </pre>
index 9f6a5d2..b423e32 100644 (file)
@@ -26,7 +26,7 @@ class Skeleton_Driver_Sql extends Skeleton_Driver
     /**
      * Handle for the current database connection.
      *
-     * @var DB
+     * @var Horde_Db_Adapter
      */
     protected $_db;
 
@@ -42,7 +42,7 @@ class Skeleton_Driver_Sql extends Skeleton_Driver
      *
      * @param array $params  Parameters:
      * <pre>
-     * 'db' - (Horde_Db_Adapter_Base) [REQUIRED] The DB instance.
+     * 'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
      * 'table' - (string) The name of the SQL table.
      *           DEFAULT: 'skeleton_foo'
      * </pre>