import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* @subpackage Resource
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Db.php 16200 2009-06-21 18:50:06Z thomas $
|
||||
* @version $Id: Db.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -43,24 +43,24 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
* @var Zend_Db_Adapter_Interface
|
||||
*/
|
||||
protected $_db;
|
||||
|
||||
|
||||
/**
|
||||
* Parameters to use
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_params = array();
|
||||
|
||||
|
||||
/**
|
||||
* Wether to register the created adapter as default table adapter
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $_isDefaultTableAdapter = true;
|
||||
|
||||
protected $_isDefaultTableAdapter = true;
|
||||
|
||||
/**
|
||||
* Set the adapter
|
||||
*
|
||||
*
|
||||
* @param $adapter string
|
||||
* @return Zend_Application_Resource_Db
|
||||
*/
|
||||
@ -72,7 +72,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
|
||||
/**
|
||||
* Adapter type to use
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAdapter()
|
||||
@ -82,7 +82,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
|
||||
/**
|
||||
* Set the adapter params
|
||||
*
|
||||
*
|
||||
* @param $adapter string
|
||||
* @return Zend_Application_Resource_Db
|
||||
*/
|
||||
@ -94,14 +94,14 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
|
||||
/**
|
||||
* Adapter parameters
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->_params;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set whether to use this as default table adapter
|
||||
*
|
||||
@ -116,7 +116,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
|
||||
/**
|
||||
* Is this adapter the default table adapter?
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function isDefaultTableAdapter()
|
||||
@ -126,19 +126,19 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
|
||||
|
||||
/**
|
||||
* Retrieve initialized DB connection
|
||||
*
|
||||
*
|
||||
* @return null|Zend_Db_Adapter_Interface
|
||||
*/
|
||||
public function getDbAdapter()
|
||||
{
|
||||
if ((null === $this->_db)
|
||||
if ((null === $this->_db)
|
||||
&& (null !== ($adapter = $this->getAdapter()))
|
||||
) {
|
||||
$this->_db = Zend_Db::factory($adapter, $this->getParams());
|
||||
}
|
||||
return $this->_db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defined by Zend_Application_Resource_Resource
|
||||
*
|
||||
|
Reference in New Issue
Block a user