API Documentation

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Application  
subpackage
Resource  
version
$Id: Db.php 24297 2011-07-29 00:11:25Z adamlundrigan $  

\Zend_Application_Resource_Db

Resource for creating database adapter

Extends from
\Zend_Application_Resource_ResourceAbstract
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Application  
subpackage
Resource  
uses
\Zend_Application_Resource_ResourceAbstract  

Properties

Propertyprotectedstring  $_adapter= 'null'

Adapter to use

Default valuenullDetails
Type
string
Propertyprotected\Zend_Db_Adapter_Abstract  $_db= ''

Propertyprotectedboolean  $_isDefaultTableAdapter= 'true'

Wether to register the created adapter as default table adapter

Default valuetrueDetails
Type
boolean
Propertyprotectedarray  $_params= 'array'

Parameters to use

Default valuearrayDetails
Type
array

Methods

methodpublic__construct( mixed $options = null ) : void

Create a instance with options

Inherited from: \Zend_Application_Resource_ResourceAbstract::__construct()

Must take an optional single argument, $options.

Parameters
Name Type Description
$options mixed
methodpublicgetAdapter( ) : string

Adapter type to use

Returns
Type Description
string
methodpublicgetBootstrap( ) : null|\Zend_Application_Bootstrap_Bootstrapper

Retrieve the bootstrap to which the resource is attached

Inherited from: \Zend_Application_Resource_ResourceAbstract::getBootstrap()
Returns
Type Description
null\Zend_Application_Bootstrap_Bootstrapper
methodpublicgetDbAdapter( ) : null|\Zend_Db_Adapter_Abstract

Retrieve initialized DB connection

Returns
Type Description
null\Zend_Db_Adapter_Abstract
methodpublicgetOptions( ) : array

Retrieve resource options

Inherited from: \Zend_Application_Resource_ResourceAbstract::getOptions()
Returns
Type Description
array
methodpublicgetParams( ) : array

Adapter parameters

Returns
Type Description
array
methodpublicinit( ) : \Zend_Db_Adapter_Abstract|null

Defined by Zend_Application_Resource_Resource

Returns
Type Description
\Zend_Db_Adapter_Abstractnull
methodpublicisDefaultTableAdapter( ) : void

Is this adapter the default table adapter?

methodpublicmergeOptions( array $array1, mixed $array2 = null ) : array

Merge options recursively

Inherited from: \Zend_Application_Resource_ResourceAbstract::mergeOptions()
Parameters
Name Type Description
$array1 array
$array2 mixed
Returns
Type Description
array
methodpublicsetAdapter( string $adapter ) : \Zend_Application_Resource_Db

Set the adapter

Parameters
Name Type Description
$adapter string
Returns
Type Description
\Zend_Application_Resource_Db
methodpublicsetBootstrap( \Zend_Application_Bootstrap_Bootstrapper $bootstrap ) : \Zend_Application_Resource_Resource

Set the bootstrap to which the resource is attached

Inherited from: \Zend_Application_Resource_ResourceAbstract::setBootstrap()
Parameters
Name Type Description
$bootstrap \Zend_Application_Bootstrap_Bootstrapper
Returns
Type Description
\Zend_Application_Resource_Resource
methodpublicsetDefaultMetadataCache( string|\Zend_Cache_Core $cache ) : \Zend_Application_Resource_Db

Set the default metadata cache

Parameters
Name Type Description
$cache string|\Zend_Cache_Core
Returns
Type Description
\Zend_Application_Resource_Db
methodpublicsetIsDefaultTableAdapter(  $isDefaultTableAdapter ) : \Zend_Application_Resource_Db

Set whether to use this as default table adapter

Parameters
Name Type Description
$isDefaultTableAdapter
Returns
Type Description
\Zend_Application_Resource_Db
methodpublicsetOptions( array $options ) : \Zend_Application_Resource_ResourceAbstract

Set options from array

Inherited from: \Zend_Application_Resource_ResourceAbstract::setOptions()
Parameters
Name Type Description
$options array Configuration for resource
Returns
Type Description
\Zend_Application_Resource_ResourceAbstract
methodpublicsetParams(  $params ) : \Zend_Application_Resource_Db

Set the adapter params

Parameters
Name Type Description
$params
Returns
Type Description
\Zend_Application_Resource_Db
Documentation was generated by DocBlox 0.13.3.