Application/Resource/Db.php

Show: PublicProtectedPrivateinherited
Table of Contents
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-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

Package: Zend\Application\Resource
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

>VPropertyprotectedstring $_adapter = null
Adapter to use
Default valuenullDetails
Type
string
>VPropertyprotected\Zend_Application_Bootstrap_Bootstrapper $_bootstrap
inherited
Parent bootstrap
Inherited from: \Zend_Application_Resource_ResourceAbstract::$$_bootstrap
>VPropertyprotected\Zend_Db_Adapter_Abstract $_db
>VPropertyprotectedboolean $_isDefaultTableAdapter = true
Wether to register the created adapter as default table adapter
Default valuetrueDetails
Type
boolean
>VPropertyprotectedarray $_options = array()
inherited
Options for the resource
Inherited from: \Zend_Application_Resource_ResourceAbstract::$$_options
Default valuearray()Details
Type
array
Inherited_from
\Zend_Application_Resource_ResourceAbstract::$$_options  
>VPropertyprotectedarray $_params = array()
Parameters to use
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_skipOptions = array('options', 'config')
inherited
Option keys to skip when calling setOptions()
Inherited from: \Zend_Application_Resource_ResourceAbstract::$$_skipOptions
Default valuearray('options', 'config')Details
Type
array
Inherited_from
\Zend_Application_Resource_ResourceAbstract::$$_skipOptions  

Methods

methodpublic__construct(mixed $options = null) : void
inherited

Create a instance with options

Inherited from: \Zend_Application_Resource_ResourceAbstract::__construct()

Must take an optional single argument, $options.

Parameters
NameTypeDescription
$optionsmixed
methodpublicgetAdapter() : string

Adapter type to use

Returns
TypeDescription
string
methodpublicgetBootstrap() : null | \Zend_Application_Bootstrap_Bootstrapper
inherited

Retrieve the bootstrap to which the resource is attached

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

Retrieve initialized DB connection

Returns
TypeDescription
null | \Zend_Db_Adapter_Abstract
methodpublicgetOptions() : array
inherited

Retrieve resource options

Inherited from: \Zend_Application_Resource_ResourceAbstract::getOptions()
Returns
TypeDescription
array
methodpublicgetParams() : array

Adapter parameters

Returns
TypeDescription
array
methodpublicinit() : \Zend_Db_Adapter_Abstract | null

Defined by Zend_Application_Resource_Resource

Returns
TypeDescription
\Zend_Db_Adapter_Abstract | null
methodpublicisDefaultTableAdapter() : void

Is this adapter the default table adapter?

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

Merge options recursively

Inherited from: \Zend_Application_Resource_ResourceAbstract::mergeOptions()
Parameters
NameTypeDescription
$array1array
$array2mixed
Returns
TypeDescription
array
methodpublicsetAdapter(string $adapter) : \Zend_Application_Resource_Db

Set the adapter

Parameters
NameTypeDescription
$adapterstring
Returns
TypeDescription
\Zend_Application_Resource_Db
methodpublicsetBootstrap(\Zend_Application_Bootstrap_Bootstrapper $bootstrap) : \Zend_Application_Resource_Resource
inherited

Set the bootstrap to which the resource is attached

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

Set the default metadata cache

Parameters
NameTypeDescription
$cachestring | \Zend_Cache_Core
Returns
TypeDescription
\Zend_Application_Resource_Db
methodpublicsetIsDefaultTableAdapter( $isDefaultTableAdapter) : \Zend_Application_Resource_Db

Set whether to use this as default table adapter

Parameters
NameTypeDescription
$isDefaultTableAdapter
Returns
TypeDescription
\Zend_Application_Resource_Db
methodpublicsetOptions(array $options) : \Zend_Application_Resource_ResourceAbstract
inherited

Set options from array

Inherited from: \Zend_Application_Resource_ResourceAbstract::setOptions()
Parameters
NameTypeDescription
$optionsarray

Configuration for resource

Returns
TypeDescription
\Zend_Application_Resource_ResourceAbstract
methodpublicsetParams( $params) : \Zend_Application_Resource_Db

Set the adapter params

Parameters
NameTypeDescription
$params
Returns
TypeDescription
\Zend_Application_Resource_Db
Documentation was generated by phpDocumentor 2.0.0a12.