Application/Resource/Db.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Application
- Subpackage
- Resource
- Version
- $Id$
\Zend_Application_Resource_Db
Package: Zend_Application\Resource






Resource for creating database adapter
- Parent(s)
- \Zend_Application_Resource_ResourceAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
Properties

boolean $_isDefaultTableAdapter = trueWether to register the created adapter as default table adapter
Default value
trueDetails- Type
- boolean
Methods

getDbAdapter() : null | \Zend_Db_Adapter_AbstractRetrieve initialized DB connection
Returns
| Type | Description |
|---|---|
| null | \Zend_Db_Adapter_Abstract |

init() : \Zend_Db_Adapter_Abstract | nullDefined by Zend_Application_Resource_Resource
Returns
| Type | Description |
|---|---|
| \Zend_Db_Adapter_Abstract | null |

setAdapter(string $adapter) : \Zend_Application_Resource_DbSet the adapter
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $adapter | string |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Db |

setDefaultMetadataCache(string | \Zend_Cache_Core $cache) : \Zend_Application_Resource_DbSet the default metadata cache
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $cache | string | \Zend_Cache_Core |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Db |

setIsDefaultTableAdapter( $isDefaultTableAdapter) : \Zend_Application_Resource_DbSet whether to use this as default table adapter
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $isDefaultTableAdapter |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Db |

setParams( $params) : \Zend_Application_Resource_DbSet the adapter params
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $params |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Db |