/**
* Database adapter
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
/**
* 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;
{
/**
* Database connection
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
/**
* 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)
'types' => 'rampage_types',
);
- public function __construct(Horde_Db_Adapter_Base $db)
+ public function __construct(Horde_Db_Adapter $db)
{
$this->_db = $db;
}
'users' => 'rampage_users',
);
- public function __construct(Horde_Db_Adapter_Base $db)
+ public function __construct(Horde_Db_Adapter $db)
{
$this->_db = $db;
}
$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');
/**
* DB handle
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
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.');
}
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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>
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
* 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,
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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>
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)
<?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
*
*/
/**
- * 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/)
*
* @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
*/
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;
}
'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',
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
public $db;
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
private $_db;
*
* @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>
/**
* Database handle for saving changes.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
/**
* 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;
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
* @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>
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
* @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>
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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>
/**
* Handle for the database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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
$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 = ?';
'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]);
}
$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'));
// 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'));
}
$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());
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) {
}
$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(
/**
* DB object.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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
/**
* Handle for the current database connection.
*
- * @var Horde_Db_Adapter_Base
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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>
/**
* Handle for the current database connection.
*
- * @var DB
+ * @var Horde_Db_Adapter
*/
protected $_db;
*
* @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>