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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Application
- Subpackage
- Resource
- Version
- $Id: Db.php 25123 2012-11-14 18:27:44Z matthew $
\Zend_Application_Resource_Db
Resource for creating database adapter
- Parent(s)
- \Zend_Application_Resource_ResourceAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
- \global\Zend_Application_Resource_ResourceAbstract
Properties

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

array $_options = array()Options for the resource
Inherited from: \Zend_Application_Resource_ResourceAbstract::$$_optionsarray()Details- Type
- array
- Inherited_from
- \Zend_Application_Resource_ResourceAbstract::$$_options

array $_skipOptions = array('options', 'config')Option keys to skip when calling setOptions()
Inherited from: \Zend_Application_Resource_ResourceAbstract::$$_skipOptionsarray('options', 'config')Details- Type
- array
- Inherited_from
- \Zend_Application_Resource_ResourceAbstract::$$_skipOptions
Methods

__construct(mixed $options = null) : voidCreate a instance with options
Inherited from: \Zend_Application_Resource_ResourceAbstract::__construct()Must take an optional single argument, $options.
| Name | Type | Description |
|---|---|---|
| $options | mixed |

getBootstrap() : null | \Zend_Application_Bootstrap_BootstrapperRetrieve the bootstrap to which the resource is attached
Inherited from: \Zend_Application_Resource_ResourceAbstract::getBootstrap()| Type | Description |
|---|---|
| null | \Zend_Application_Bootstrap_Bootstrapper |

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

getOptions() : arrayRetrieve resource options
Inherited from: \Zend_Application_Resource_ResourceAbstract::getOptions()| Type | Description |
|---|---|
| array |

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

mergeOptions(array $array1, mixed $array2 = null) : arrayMerge options recursively
Inherited from: \Zend_Application_Resource_ResourceAbstract::mergeOptions()| Name | Type | Description |
|---|---|---|
| $array1 | array | |
| $array2 | mixed |
| Type | Description |
|---|---|
| array |

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

setBootstrap(\Zend_Application_Bootstrap_Bootstrapper $bootstrap) : \Zend_Application_Resource_ResourceSet the bootstrap to which the resource is attached
Inherited from: \Zend_Application_Resource_ResourceAbstract::setBootstrap()| Name | Type | Description |
|---|---|---|
| $bootstrap | \Zend_Application_Bootstrap_Bootstrapper |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Resource |

setDefaultMetadataCache(string | \Zend_Cache_Core $cache) : \Zend_Application_Resource_DbSet the default metadata cache
| 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
| Name | Type | Description |
|---|---|---|
| $isDefaultTableAdapter |
| Type | Description |
|---|---|
| \Zend_Application_Resource_Db |

setOptions(array $options) : \Zend_Application_Resource_ResourceAbstractSet options from array
Inherited from: \Zend_Application_Resource_ResourceAbstract::setOptions()| Name | Type | Description |
|---|---|---|
| $options | array | Configuration for resource |
| Type | Description |
|---|---|
| \Zend_Application_Resource_ResourceAbstract |

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