Resource for creating database adapter

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

 Methods

Create a instance with options

__construct(mixed $options = null
Inherited

Must take an optional single argument, $options.

inherited_from \Zend_Application_Resource_Resource::__construct()

Parameters

$options

mixed

Adapter type to use

getAdapter() : string

Returns

string

Retrieve the bootstrap to which the resource is attached

getBootstrap() : null | \Zend_Application_Bootstrap_Bootstrapper
Inherited
inherited_from \Zend_Application_Resource_Resource::getBootstrap()

Returns

null\Zend_Application_Bootstrap_Bootstrapper

Retrieve initialized DB connection

getDbAdapter() : null | \Zend_Db_Adapter_Abstract

Returns

null\Zend_Db_Adapter_Abstract

Retrieve resource options

getOptions() : array
Inherited
inherited_from \Zend_Application_Resource_Resource::getOptions()

Returns

array

Adapter parameters

getParams() : array

Returns

array

Defined by Zend_Application_Resource_Resource

init() : \Zend_Db_Adapter_Abstract | null

Returns

\Zend_Db_Adapter_Abstractnull

Is this adapter the default table adapter?

isDefaultTableAdapter() : boolean

Returns

boolean

Merge options recursively

mergeOptions(array $array1, mixed $array2 = null) : array
Inherited

Parameters

$array1

array

$array2

mixed

Returns

array

Set the adapter

setAdapter(string $adapter) : \Zend_Application_Resource_Db

Parameters

$adapter

string

Returns

\Zend_Application_Resource_Db

Set the bootstrap to which the resource is attached

setBootstrap(\Zend_Application_Bootstrap_Bootstrapper $bootstrap) : \Zend_Application_Resource_Resource
Inherited
inherited_from \Zend_Application_Resource_Resource::setBootstrap()

Parameters

$bootstrap

\Zend_Application_Bootstrap_Bootstrapper

Returns

\Zend_Application_Resource_Resource

Set the default metadata cache

setDefaultMetadataCache(string|\Zend_Cache_Core $cache) : \Zend_Application_Resource_Db

Parameters

$cache

string\Zend_Cache_Core

Returns

\Zend_Application_Resource_Db

Set whether to use this as default table adapter

setIsDefaultTableAdapter(boolean $isDefaultTableAdapter) : \Zend_Application_Resource_Db

Parameters

$isDefaultTableAdapter

boolean

Returns

\Zend_Application_Resource_Db

Set options from array

setOptions(array $options) : \Zend_Application_Resource_ResourceAbstract
Inherited
inherited_from \Zend_Application_Resource_Resource::setOptions()

Parameters

$options

array

Configuration for resource

Returns

\Zend_Application_Resource_ResourceAbstract

Set the adapter params

setParams(array $params) : \Zend_Application_Resource_Db

Parameters

$params

array

Returns

\Zend_Application_Resource_Db

 Properties

 

Adapter to use

$_adapter : string

Default

null
 

Parent bootstrap

$_bootstrap : \Zend_Application_Bootstrap_Bootstrapper

Default

 

$_db

$_db : \Zend_Db_Adapter_Abstract

Default

 

Wether to register the created adapter as default table adapter

$_isDefaultTableAdapter : boolean

Default

true
 

Options for the resource

$_options : array

Default

array()
 

Parameters to use

$_params : array

Default

array()
 

Option keys to skip when calling setOptions()

$_skipOptions : array

Default

array('options', 'config')