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: Db.php 25123 2012-11-14 18:27:44Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Application_Resource_ResourceAbstract |
24 * @see Zend_Application_Resource_ResourceAbstract |
25 */ |
25 */ |
30 * |
30 * |
31 * @uses Zend_Application_Resource_ResourceAbstract |
31 * @uses Zend_Application_Resource_ResourceAbstract |
32 * @category Zend |
32 * @category Zend |
33 * @package Zend_Application |
33 * @package Zend_Application |
34 * @subpackage Resource |
34 * @subpackage Resource |
35 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
35 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 */ |
37 */ |
38 class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbstract |
38 class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbstract |
39 { |
39 { |
40 /** |
40 /** |
86 } |
86 } |
87 |
87 |
88 /** |
88 /** |
89 * Set the adapter params |
89 * Set the adapter params |
90 * |
90 * |
91 * @param string $adapter |
91 * @param array $params |
92 * @return Zend_Application_Resource_Db |
92 * @return Zend_Application_Resource_Db |
93 */ |
93 */ |
94 public function setParams(array $params) |
94 public function setParams(array $params) |
95 { |
95 { |
96 $this->_params = $params; |
96 $this->_params = $params; |
108 } |
108 } |
109 |
109 |
110 /** |
110 /** |
111 * Set whether to use this as default table adapter |
111 * Set whether to use this as default table adapter |
112 * |
112 * |
113 * @param boolean $defaultTableAdapter |
113 * @param bool $isDefaultTableAdapter |
114 * @return Zend_Application_Resource_Db |
114 * @return Zend_Application_Resource_Db |
115 */ |
115 */ |
116 public function setIsDefaultTableAdapter($isDefaultTableAdapter) |
116 public function setIsDefaultTableAdapter($isDefaultTableAdapter) |
117 { |
117 { |
118 $this->_isDefaultTableAdapter = $isDefaultTableAdapter; |
118 $this->_isDefaultTableAdapter = $isDefaultTableAdapter; |
120 } |
120 } |
121 |
121 |
122 /** |
122 /** |
123 * Is this adapter the default table adapter? |
123 * Is this adapter the default table adapter? |
124 * |
124 * |
125 * @return void |
125 * @return bool |
126 */ |
126 */ |
127 public function isDefaultTableAdapter() |
127 public function isDefaultTableAdapter() |
128 { |
128 { |
129 return $this->_isDefaultTableAdapter; |
129 return $this->_isDefaultTableAdapter; |
130 } |
130 } |
158 public function init() |
158 public function init() |
159 { |
159 { |
160 if (null !== ($db = $this->getDbAdapter())) { |
160 if (null !== ($db = $this->getDbAdapter())) { |
161 return $db; |
161 return $db; |
162 } |
162 } |
|
163 |
|
164 return null; |
163 } |
165 } |
164 |
166 |
165 /** |
167 /** |
166 * Set the default metadata cache |
168 * Set the default metadata cache |
167 * |
169 * |