ConnectionManager Class Reference

Inheritance diagram for ConnectionManager:

Object

List of all members.


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 43 of file connection_manager.php.


Member Function Documentation

& 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 218 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 192 of file connection_manager.php.

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

& ConnectionManager::getInstance (  )  [static]

Gets a reference to the ConnectionManger object instance

Returns:
object Instance public

Definition at line 81 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 138 of file connection_manager.php.

References getInstance().

Referenced by 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 Connections config, or an array containing the file and class name of the object.
Returns:
boolean True on success, null on failure or false if the class is already loaded public

Definition at line 157 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 126 of file connection_manager.php.

References getInstance().


Member Data Documentation

ConnectionManager::$_connectionsEnum = array()

Definition at line 64 of file connection_manager.php.

ConnectionManager::$_dataSources = array()

Definition at line 57 of file connection_manager.php.

ConnectionManager::$config = null

Definition at line 50 of file connection_manager.php.


The documentation for this class was generated from the following file: