ConnectionManager Class Reference

Inheritance diagram for ConnectionManager:

Object List of all members.

Public Member Functions

 __construct ()
 __destruct ()
 __getDriver ($config)

Static Public Member Functions

create ($name= '', $config=array())
 enumConnectionObjects ()
getDataSource ($name)
getInstance ()
 getSourceName (&$source)
 loadDataSource ($connName)
 sourceList ()

Public Attributes

 $_connectionsEnum = array()
 $_dataSources = array()
 $config = null

Detailed Description

Definition at line 38 of file connection_manager.php.


Constructor & Destructor Documentation

ConnectionManager::__construct (  ) 

Constructor.

Reimplemented from Object.

Definition at line 64 of file connection_manager.php.

References config().

ConnectionManager::__destruct (  ) 

Destructor.

private

Definition at line 257 of file connection_manager.php.

References Configure::read().


Member Function Documentation

ConnectionManager::__getDriver ( config  ) 

Returns the file, class name, and parent for the given driver.

Returns:
array An indexed array with: filename, classname, and parent private

Definition at line 236 of file connection_manager.php.

References $config, $filename, and camelize().

& ConnectionManager::create ( name = '',
config = array() 
) [static]

Dynamically creates a DataSource object at runtime, with the given name and settings

Parameters:
string $name The DataSource name
array $config The DataSource configuration settings
Returns:
object A reference to the DataSource object, or null if creation failed public

Definition at line 217 of file connection_manager.php.

References $config, and getInstance().

ConnectionManager::enumConnectionObjects (  )  [static]

Gets a list of class and file names associated with the user-defined DataSource connections

Returns:
array An associative array of elements where the key is the connection name (as defined in Connections), and the value is an array with keys 'filename' and 'classname'. public

Definition at line 191 of file connection_manager.php.

References $config, config(), and getInstance().

& ConnectionManager::getDataSource ( name  )  [static]

Gets a reference to a DataSource object

Parameters:
string $name The name of the DataSource, as defined in app/config/database.php
Returns:
object Instance public

Definition at line 93 of file connection_manager.php.

References config(), and getInstance().

Referenced by CakeSchema::__columns(), SchemaShell::__create(), __destroy(), __gc(), TreeBehavior::__getMax(), TreeBehavior::__getMin(), ModelTask::__interactive(), __read(), SchemaShell::__run(), Model::__saveMulti(), Scaffold::__scaffold(), SchemaShell::__update(), __write(), Model::_deleteLinks(), Model::_findCount(), TranslateBehavior::beforeFind(), Model::call__(), Model::deconstruct(), Model::del(), Model::deleteAll(), SchemaShell::dump(), Sanitize::escape(), Model::escapeField(), Model::find(), Model::getAffectedRows(), Model::getColumnType(), Model::getDataSource(), Model::getNumRows(), ModelTask::listAll(), ControllerTask::listAll(), AclNode::node(), Model::query(), DboSource::queryAssociation(), DboOracle::queryAssociation(), DboSource::read(), CakeSchema::read(), TreeBehavior::recover(), TreeBehavior::removefromtree(), Model::save(), Model::saveAll(), Model::schema(), Model::setDataSource(), Model::setSource(), TranslateBehavior::setup(), and Model::updateAll().

& ConnectionManager::getInstance (  )  [static]

Gets a reference to the ConnectionManger object instance

Returns:
object Instance public

Definition at line 76 of file connection_manager.php.

Referenced by create(), enumConnectionObjects(), getDataSource(), getSourceName(), loadDataSource(), and sourceList().

ConnectionManager::getSourceName ( &$  source  )  [static]

Gets a DataSource name from an object reference

Parameters:
object $source DataSource object
Returns:
string Datasource name public

Definition at line 135 of file connection_manager.php.

References getInstance().

Referenced by DataSource::__cacheDescription(), and DataSource::listSources().

ConnectionManager::loadDataSource ( connName  )  [static]

Loads the DataSource class for the given connection name

Parameters:
mixed $connName A string name of the connection, as defined in app/config/database.php, or an array containing the filename (without extension) and class name of the object, to be found in app/models/datasources/ or cake/libs/model/datasources/.
Returns:
boolean True on success, null on failure or false if the class is already loaded public

Definition at line 155 of file connection_manager.php.

References __(), fileExistsInPath(), and getInstance().

ConnectionManager::sourceList (  )  [static]

Gets the list of available DataSource connections

Returns:
array List of available connections public

Definition at line 123 of file connection_manager.php.

References getInstance().


Member Data Documentation

ConnectionManager::$_connectionsEnum = array()

Definition at line 59 of file connection_manager.php.

ConnectionManager::$_dataSources = array()

Definition at line 52 of file connection_manager.php.

ConnectionManager::$config = null

Definition at line 45 of file connection_manager.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:55 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7