equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Application |
16 * @package Zend_Application |
17 * @subpackage Resource |
17 * @subpackage Resource |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Multidb.php 24593 2012-01-05 20:35:02Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 require_once 'Zend/Application/Resource/ResourceAbstract.php'; |
23 require_once 'Zend/Application/Resource/ResourceAbstract.php'; |
24 |
24 |
25 require_once 'Zend/Db/Table.php'; |
25 require_once 'Zend/Db/Table.php'; |
49 * </pre> |
49 * </pre> |
50 * |
50 * |
51 * @category Zend |
51 * @category Zend |
52 * @package Zend_Application |
52 * @package Zend_Application |
53 * @subpackage Resource |
53 * @subpackage Resource |
54 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
54 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
55 * @license http://framework.zend.com/license/new-bsd New BSD License |
55 * @license http://framework.zend.com/license/new-bsd New BSD License |
56 */ |
56 */ |
57 class Zend_Application_Resource_Multidb extends Zend_Application_Resource_ResourceAbstract |
57 class Zend_Application_Resource_Multidb extends Zend_Application_Resource_ResourceAbstract |
58 { |
58 { |
59 /** |
59 /** |
112 * @param string|Zend_Db_Adapter_Abstract $db The db to determine whether it's set as default |
112 * @param string|Zend_Db_Adapter_Abstract $db The db to determine whether it's set as default |
113 * @return boolean True if the given parameter is configured as default. False otherwise |
113 * @return boolean True if the given parameter is configured as default. False otherwise |
114 */ |
114 */ |
115 public function isDefault($db) |
115 public function isDefault($db) |
116 { |
116 { |
117 if(!$db instanceof Zend_Db_Adapter_Abstract) { |
117 if (!$db instanceof Zend_Db_Adapter_Abstract) { |
118 $db = $this->getDb($db); |
118 $db = $this->getDb($db); |
119 } |
119 } |
120 |
120 |
121 return $db === $this->_defaultDb; |
121 return $db === $this->_defaultDb; |
122 } |
122 } |